/* ============================================================================
   chart-sub.css — раздел «График»: шкура «Чертёж» поверх общего каркаса сайта.
   Каркас (бегущая строка, шапка, вкладки, герой, заголовки «01 · НАЗВАНИЕ», карточки, сетка .sx-g, окна-досье)
   — общий со «Статистикой» и «Индикаторами» (stats-sub.css). Здесь только своё:
   ровный графитовый фон без свечений, синие «чернила» (--ch-ink) и оранжевый «маркер» (--ch-mark),
   миллиметровка только внутри графиков, номера секций — отметка на линейке, подпись — размерная линия.
   Классы раздела — с префиксом ch-.
   ============================================================================ */
body.ch-page {
    --ch-bg: #0f1215; --ch-surface: #151a1f; --ch-surface2: #1a2027; --ch-plate: #1b2128;
    --ch-line: rgba(160, 190, 220, .12); --ch-line2: rgba(160, 190, 220, .24);
    --ch-ink: #5cb8ff; --ch-ink-wash: rgba(92, 184, 255, .09); --ch-ink-line: rgba(92, 184, 255, .4); --ch-on-ink: #06121d;
    --ch-mark: #ff9a4d; --ch-mark-wash: rgba(255, 154, 77, .1); --ch-mark-line: rgba(255, 154, 77, .45);
    --ch-up: #34d399; --ch-dn: #f87171; --ch-grid: rgba(160, 190, 220, .05); --ch-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --ch-cond: 'IBM Plex Sans Condensed', 'Onest', sans-serif;
    /* токены общего каркаса — окна-досье и общие блоки сразу берут цвета раздела */
    --sx-a: #5cb8ff; --sx-b: #ff9a4d; --sx-c: #b794f6;
    --sx-a-wash: rgba(92, 184, 255, .08); --sx-b-wash: rgba(255, 154, 77, .08);
    --sx-a-line: rgba(92, 184, 255, .34); --sx-b-line: rgba(255, 154, 77, .34);
    --sx-tick: rgba(92, 184, 255, .3);
    --sx-heat: linear-gradient(90deg, #1f6fc4, #5cb8ff, #ffd0a1, #ff9a4d);
    --mx-surface: #151a1f; --mx-line: rgba(160, 190, 220, .12); --mx-line-strong: rgba(160, 190, 220, .22);
    background: var(--ch-bg) !important;
}
body.light.ch-page {
    --ch-bg: #f3f1ec; --ch-surface: #fbfaf7; --ch-surface2: #f1eee7; --ch-plate: #ffffff;
    --ch-line: rgba(30, 50, 80, .12); --ch-line2: rgba(30, 50, 80, .24);
    --ch-ink: #1f6fc4; --ch-ink-wash: rgba(31, 111, 196, .08); --ch-ink-line: rgba(31, 111, 196, .4); --ch-on-ink: #fff;
    --ch-mark: #c2570c; --ch-mark-wash: rgba(194, 87, 12, .08); --ch-mark-line: rgba(194, 87, 12, .4);
    --ch-up: #059669; --ch-dn: #dc2626; --ch-grid: rgba(30, 50, 80, .055);
    --sx-a: #1f6fc4; --sx-b: #c2570c; --sx-c: #7c3aed;
    --sx-a-wash: rgba(31, 111, 196, .07); --sx-b-wash: rgba(194, 87, 12, .07);
    --sx-a-line: rgba(31, 111, 196, .3); --sx-b-line: rgba(194, 87, 12, .3); --sx-tick: rgba(31, 111, 196, .3);
    --mx-surface: #fbfaf7; --mx-line: rgba(30, 50, 80, .12); --mx-line-strong: rgba(30, 50, 80, .2);
}
/* фон: ровный, без свечений и частиц */
body.ch-page::before, body.ch-page::after { display: none !important; }
.ch-page #particles-canvas, .ch-page .mx-aurora, .ch-page #mxBg, .ch-page .mx-grain { display: none !important; }
.ch-page .up { color: var(--ch-up); } .ch-page .down { color: var(--ch-dn); }

/* ---------- шкура общих элементов ---------- */
.ch-page .kt-tabs { background: var(--ch-surface); border-color: var(--ch-line); }
.ch-page .kt-tabs a.on { background: var(--ch-ink); color: var(--ch-on-ink); box-shadow: none; }
.ch-page .sx-led { background: var(--ch-ink); box-shadow: none; animation: chLed 2.4s ease-in-out infinite; }
.ch-page .sx-led.off { background: var(--text-secondary); animation: none; }
@keyframes chLed { 50% { opacity: .35; } }
.ch-page .page-content .hero .hero-sub { color: var(--ch-ink); background: none; -webkit-text-fill-color: currentColor; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* подпись героя — размерная линия |←——→| */
.ch-page .page-content .hero .hero-sub::after { content: ''; flex: 0 0 30px; height: 9px; border-left: 1px solid currentColor; border-right: 1px solid currentColor; background: linear-gradient(currentColor, currentColor) 0 50% / 100% 1px no-repeat; }
/* номер секции — отметка на линейке */
.ch-page .cm-num { font: 600 13px var(--ch-mono); color: var(--ch-ink); padding: 2px 8px 7px; border: 1px solid var(--ch-ink-line); border-radius: 4px; text-shadow: none; box-shadow: none; -webkit-text-stroke: 0;
    background: linear-gradient(90deg, var(--ch-ink-line) 1px, transparent 1px) 0 100% / 6px 5px repeat-x, var(--ch-surface); }
body.light.ch-page .cm-num { background: linear-gradient(90deg, var(--ch-ink-line) 1px, transparent 1px) 0 100% / 6px 5px repeat-x, #fff; color: var(--ch-ink); }
.ch-page .strip-head::after { height: 6px; opacity: 1; background: linear-gradient(90deg, var(--ch-line2) 1px, transparent 1px) 0 100% / 10px 5px repeat-x, linear-gradient(var(--ch-line2), var(--ch-line2)) 0 100% / 100% 1px no-repeat; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.ch-page .strip-title { font-size: 13px; color: var(--text-color); }
.ch-page .strip-title i { color: var(--ch-ink); }
.ch-page .strip-legend { font-size: 12px; }
.ch-page .strip-legend i { color: var(--ch-ink); }
.ch-page .sx-card { background: var(--ch-surface); border-color: var(--ch-line); }
.ch-page .sx-card::before { display: none; }
.ch-page .cm-verdict { font-size: 13.5px; line-height: 1.5; color: var(--text-color); }
.ch-page .cm-verdict i { color: var(--ch-mark); }
.ch-page .cm-verdict b { color: var(--ch-ink); }
.ch-page .cm-next a:hover { border-color: var(--ch-ink-line); background: var(--ch-ink-wash); }
.ch-page .cm-next i { color: var(--ch-ink); }
.ch-page .cm-empty { font-size: 13px; }
.ch-page .page-footer { border-top-color: var(--ch-line); }
/* миллиметровка — только внутри графиков */
.ch-paper { background-image: linear-gradient(var(--ch-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ch-grid) 1px, transparent 1px); background-size: 20px 20px; }
.ch-n { font-family: var(--ch-mono); font-variant-numeric: tabular-nums; }

/* ---------- окошко-подсказка (то же, что .ix-tip у «Индикаторов», в цветах раздела) ---------- */
.ch-page .ix-tip { position: fixed; z-index: 9999; left: 0; top: 0; display: none; pointer-events: none; min-width: 170px; max-width: 320px; padding: 10px 13px;
    border: 1px solid var(--ch-line2); border-radius: 10px; background: rgba(21, 26, 31, .97); color: #e8eef5;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font: 500 13px/1.5 'Onest', sans-serif; }
.ch-page .ix-tip.on { display: block; }
.ch-page .ix-tip b.up, .ch-page .ix-tip .up { color: #34d399; } .ch-page .ix-tip b.down, .ch-page .ix-tip .down { color: #f87171; }
.ch-page .ix-tip small { display: block; color: #9fb0c2; font-size: 12px; margin-bottom: 4px; }
.ch-page .ix-tip-r { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(160, 190, 220, .14); padding-top: 4px; margin-top: 4px; }
.ch-page .ix-tip-r span { color: #9fb0c2; }
body.light.ch-page .ix-tip { background: rgba(255, 255, 255, .98); color: #13202e; box-shadow: 0 12px 30px rgba(0, 0, 0, .16); }
body.light.ch-page .ix-tip small, body.light.ch-page .ix-tip-r span { color: #5b6b7d; }
body.light.ch-page .ix-tip .up { color: #059669; } body.light.ch-page .ix-tip .down { color: #dc2626; }

/* ---------- герой: деталь справа «Линейка дня» ---------- */
.ch-page .hero { align-items: center; }
.ch-hero-r { margin-left: auto; flex: 0 1 520px; min-width: 0; }
.ch-rule .mx-help-btn { position: absolute; top: 8px; right: 8px; }
.ch-rule-cap { padding-right: 26px; }
.ch-rule { padding: 12px 16px 12px; border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-surface); position: relative; }
.ch-rule-cap { display: flex; justify-content: space-between; gap: 10px; font: 600 11px var(--ch-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.ch-rule-cap b { color: var(--ch-ink); font-weight: 600; }
.ch-rule-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ch-rule-top b { font: 700 16px 'Onest', sans-serif; color: var(--text-color); cursor: pointer; }
.ch-rule-top .ch-n { font-size: 20px; font-weight: 600; color: var(--text-color); }
.ch-rule-top em { font-style: normal; font-family: var(--ch-mono); font-size: 14px; font-weight: 600; }
.ch-rule canvas { display: block; width: 100%; height: 92px; margin-top: 4px; }
.ch-rule-bot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.ch-rule-bot b { color: var(--text-color); font-family: var(--ch-mono); }

/* ---------- общий поиск ---------- */
.ch-search { position: relative; min-width: 0; }
.ch-search-in { display: flex; align-items: center; gap: 9px; padding: 0 10px 0 12px; height: 40px; border: 1px solid var(--ch-line2); border-radius: 9px; background: var(--ch-bg); color: var(--text-secondary); }
.ch-search-in:focus-within { border-color: var(--ch-ink); }
.ch-search-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-color); font: 500 15px 'Onest', sans-serif; }
.ch-search-in input::placeholder { color: var(--text-secondary); opacity: .85; }
.ch-search-in kbd { font: 600 12px var(--ch-mono); padding: 1px 7px; border: 1px solid var(--ch-line2); border-radius: 5px; color: var(--text-secondary); }
.ch-sdrop { position: absolute; z-index: 60; left: 0; top: calc(100% + 6px); width: max(100%, 460px); max-width: calc(100vw - 24px); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px;
    border: 1px solid var(--ch-line2); border-radius: 12px; background: var(--ch-plate); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: none; }
.ch-sdrop.on { display: block; }
.ch-sgrp { padding: 8px 10px 4px; font: 600 11px var(--ch-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); display: flex; justify-content: space-between; }
.ch-sres { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.ch-sres:hover, .ch-sres.on { background: var(--ch-ink-wash); }
.ch-sres .ic { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--ch-surface2); font: 700 11px var(--ch-mono); color: var(--ch-ink); }
.ch-sres .ic img { width: 100%; height: 100%; object-fit: cover; }
.ch-sres b { font: 700 14.5px 'Onest', sans-serif; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sres span { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sres .tg { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ch-sres .tg em { font-style: normal; font: 600 11px var(--ch-cond); letter-spacing: .06em; padding: 1px 7px; border-radius: 5px; background: var(--ch-surface2); color: var(--text-secondary); }
.ch-sres .tg em.t-crypto { color: #f7b955; } .ch-sres .tg em.t-stock { color: var(--ch-ink); } .ch-sres .tg em.t-index { color: #b794f6; } .ch-sres .tg em.t-fx { color: #34d399; } .ch-sres .tg em.t-futures { color: var(--ch-mark); } .ch-sres .tg em.t-etf { color: #22d3ee; } .ch-sres .tg em.t-bond { color: #94a3b8; } .ch-sres .tg em.t-fund { color: #22d3ee; }
.ch-sres .tg small { font-size: 11.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }
.ch-flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.ch-sempty { padding: 14px 12px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.ch-sstar { color: var(--ch-mark); font-size: 11px; }

/* ---------- рабочее место графика ---------- */
.ch-desk { display: grid; grid-template-columns: 46px minmax(0, 1fr) 300px; border: 1px solid var(--ch-line); border-radius: 14px; background: var(--ch-surface); position: relative; }
.ch-desk:fullscreen { border-radius: 0; height: 100vh; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--ch-bg); }
.ch-desk:fullscreen .ch-plot { height: auto; }
.ch-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--ch-line); }
.ch-bar .ch-search { flex: 0 1 330px; }
.ch-sym { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ch-sym .ic { align-self: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ch-surface2); font: 700 11px var(--ch-mono); color: var(--ch-ink); }
.ch-sym .ic img { width: 100%; height: 100%; object-fit: cover; }
.ch-sym b { font: 700 18px 'Onest', sans-serif; color: var(--text-color); cursor: pointer; }
.ch-sym .px { font: 600 21px var(--ch-mono); color: var(--text-color); }
.ch-sym .chg { font: 600 14px var(--ch-mono); }
.ch-sym small { font-size: 12.5px; color: var(--text-secondary); }
.ch-sym .ch-fav { cursor: pointer; color: var(--text-secondary); font-size: 15px; align-self: center; }
.ch-sym .ch-fav.on { color: var(--ch-mark); }
.ch-sp { flex: 1; }
.ch-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--ch-line); border-radius: 9px; background: var(--ch-bg); flex-wrap: wrap; }
.ch-seg button { border: 0; background: transparent; padding: 5px 9px; font: 600 13px 'Onest', sans-serif; color: var(--text-secondary); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ch-seg button:hover { color: var(--text-color); }
.ch-seg button.on { background: var(--ch-ink); color: var(--ch-on-ink); }
.ch-seg button:disabled { opacity: .35; cursor: not-allowed; }
.ch-btn { border: 1px solid var(--ch-line); background: var(--ch-bg); color: var(--text-color); padding: 6px 11px; border-radius: 9px; font: 600 13px 'Onest', sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ch-btn:hover { border-color: var(--ch-ink-line); }
.ch-btn.on { border-color: var(--ch-ink); color: var(--ch-ink); background: var(--ch-ink-wash); }
.ch-btn i { color: var(--ch-ink); }
.ch-tools { display: flex; flex-direction: column; gap: 3px; padding: 8px 6px; border-right: 1px solid var(--ch-line); }
.ch-tools button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.ch-tools button:hover { color: var(--text-color); background: var(--ch-surface2); }
.ch-tools button.on { background: var(--ch-ink-wash); color: var(--ch-ink); box-shadow: inset 0 0 0 1px var(--ch-ink-line); }
.ch-tools hr { border: 0; border-top: 1px solid var(--ch-line); margin: 4px 3px; }
.ch-plotw { position: relative; min-width: 0; display: flex; flex-direction: column; }
.ch-plot { position: relative; height: 560px; min-width: 0; }
.ch-plot .ch-lw { position: absolute; inset: 0; }
.ch-plot canvas.ch-ov { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.ch-plot.drawing { cursor: crosshair; }
.ch-legend { position: absolute; left: 10px; top: 8px; z-index: 5; pointer-events: none; display: flex; flex-direction: column; gap: 2px; font: 600 12.5px var(--ch-mono); color: var(--text-secondary); max-width: calc(100% - 90px); }
.ch-legend span { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.ch-legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.ch-plate { position: absolute; z-index: 6; pointer-events: none; padding: 8px 11px; border-radius: 9px; background: var(--ch-plate); border: 1px solid var(--ch-line2); font-size: 13px; color: var(--text-color); min-width: 178px; display: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
.ch-plate .d { font-weight: 700; margin-bottom: 4px; }
.ch-plate .g { display: grid; grid-template-columns: auto auto; gap: 1px 14px; font-family: var(--ch-mono); }
.ch-plate .g span:nth-child(odd) { color: var(--text-secondary); font-family: 'Onest', sans-serif; }
.ch-plate .g span:nth-child(even) { text-align: right; }
.ch-plate .ev { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--ch-line); font-size: 12.5px; max-width: 280px; white-space: normal; }
.ch-state { position: absolute; inset: 0; z-index: 7; display: none; place-items: center; text-align: center; padding: 20px; font-size: 14px; color: var(--text-secondary); background: color-mix(in srgb, var(--ch-surface) 82%, transparent); }
.ch-state.on { display: grid; }
.ch-state b { display: block; color: var(--text-color); font-size: 15px; margin-bottom: 6px; }
.ch-hist { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 6; padding: 4px 12px; border-radius: 999px; background: var(--ch-plate); border: 1px solid var(--ch-line2); font-size: 12.5px; color: var(--text-secondary); display: none; }
.ch-hist.on { display: block; }
.ch-text-in { position: absolute; z-index: 8; min-width: 160px; padding: 5px 8px; border: 1px solid var(--ch-ink); border-radius: 6px; background: var(--ch-plate); color: var(--text-color); font: 600 14px 'Onest', sans-serif; outline: 0; }
.ch-side { border-left: 1px solid var(--ch-line); padding: 12px 14px; display: flex; flex-direction: column; gap: 16px; font-size: 13.5px; min-width: 0; }
.ch-side h4 { margin: 0 0 7px; font: 600 11.5px var(--ch-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ch-kv { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 5px 14px; }
.ch-kv > span { color: var(--text-secondary); }
.ch-kv > b { font: 600 13.5px var(--ch-mono); text-align: right; color: var(--text-color); }
.ch-out { font-size: 13px; line-height: 1.5; color: var(--text-color); padding: 9px 11px; border-radius: 8px; background: var(--ch-ink-wash); border-left: 3px solid var(--ch-ink); }
.ch-foot { grid-column: 1 / -1; padding: 9px 14px; border-top: 1px solid var(--ch-line); font-size: 13px; color: var(--text-color); display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.ch-foot > span { color: var(--text-secondary); }
.ch-foot b { font-family: var(--ch-mono); font-weight: 600; }
.ch-foot .ch-note { color: var(--ch-mark); }
/* выпадающее меню индикаторов / сигналов */
.ch-menu { position: relative; }
.ch-pop { position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; width: 300px; max-height: 70vh; overflow-y: auto; padding: 8px; border: 1px solid var(--ch-line2); border-radius: 12px; background: var(--ch-plate); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: none; }
.ch-pop.on { display: block; }
.ch-pop h5 { margin: 6px 6px 4px; font: 600 11px var(--ch-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.ch-pop label { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; font-size: 13.5px; color: var(--text-color); cursor: pointer; }
.ch-pop label:hover { background: var(--ch-ink-wash); }
.ch-pop label small { margin-left: auto; color: var(--text-secondary); font-family: var(--ch-mono); font-size: 12px; }
.ch-pop input[type=checkbox] { accent-color: var(--ch-ink); width: 15px; height: 15px; }
.ch-pop .sw { width: 12px; height: 3px; border-radius: 2px; }
.ch-pop p { margin: 6px 8px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
/* окно горячих клавиш */
.ch-keys { position: fixed; inset: 0; z-index: 9000; display: none; place-items: center; background: rgba(0, 0, 0, .45); }
.ch-keys.on { display: grid; }
.ch-keys > div { width: min(560px, calc(100vw - 24px)); padding: 18px 20px; border-radius: 14px; background: var(--ch-plate); border: 1px solid var(--ch-line2); color: var(--text-color); }
.ch-keys h3 { margin: 0 0 10px; font: 600 16px 'Unbounded', sans-serif; }
.ch-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.ch-keys dt { font: 600 13px var(--ch-mono); color: var(--ch-ink); }
.ch-keys dd { margin: 0; color: var(--text-secondary); }

/* ---------- таблицы и строки раздела ---------- */
.ch-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ch-t th { padding: 6px 8px; font: 600 11px var(--ch-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); text-align: right; border-bottom: 1px solid var(--ch-line); white-space: nowrap; }
.ch-t td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--ch-line); font-family: var(--ch-mono); color: var(--text-color); white-space: nowrap; }
.ch-t th:first-child, .ch-t td:first-child { text-align: left; }
.ch-t td:first-child { font-family: 'Onest', sans-serif; font-weight: 600; white-space: normal; }
.ch-t tr[data-m], .ch-t tr[data-go] { cursor: pointer; }
.ch-t tr[data-m]:hover td, .ch-t tr[data-go]:hover td { background: var(--ch-ink-wash); }
.ch-t td small { display: block; font: 500 12px 'Onest', sans-serif; color: var(--text-secondary); }
.ch-row { display: grid; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--ch-line); font-size: 13.5px; }
.ch-row:last-child { border-bottom: 0; }
.ch-row[data-m], .ch-row[data-go] { cursor: pointer; }
.ch-row[data-m]:hover, .ch-row[data-go]:hover { background: var(--ch-ink-wash); }
.ch-bar2 { position: relative; height: 10px; border-radius: 5px; background: var(--ch-surface2); overflow: hidden; }
.ch-bar2 i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.ch-tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font: 600 11.5px var(--ch-cond); letter-spacing: .04em; background: var(--ch-surface2); color: var(--text-secondary); }
.ch-tag.ok { color: var(--ch-up); } .ch-tag.no { color: var(--ch-dn); } .ch-tag.ink { color: var(--ch-ink); } .ch-tag.mk { color: var(--ch-mark); }
.ch-big { font: 600 26px var(--ch-mono); color: var(--text-color); line-height: 1.1; }
.ch-sub { font-size: 12.5px; color: var(--text-secondary); }
.ch-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.ch-facts > div { padding: 8px 10px; border-radius: 9px; background: var(--ch-surface2); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ch-facts small { font: 600 11px var(--ch-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.ch-facts b { font: 600 17px var(--ch-mono); color: var(--text-color); }
.ch-facts span { font-size: 12px; color: var(--text-secondary); }
.ch-cv { display: block; width: 100%; }
.ch-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--ch-line); border-radius: 999px; font-size: 13px; color: var(--text-color); background: var(--ch-surface2); cursor: pointer; }
.ch-pill:hover { border-color: var(--ch-ink-line); }
.ch-pill.on { border-color: var(--ch-ink); color: var(--ch-ink); }
.ch-pill i.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ch-pill .x { margin-left: 2px; color: var(--text-secondary); cursor: pointer; }
.ch-hid[hidden] { display: none; }

@media (max-width: 1200px) {
    .ch-desk { grid-template-columns: 46px minmax(0, 1fr); }
    .ch-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ch-line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .ch-hero-r { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 760px) {
    .ch-desk { grid-template-columns: minmax(0, 1fr); }
    .ch-tools { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ch-line); scrollbar-width: none; }
    .ch-tools button { flex: 0 0 34px; }
    .ch-tools hr { display: none; }
    .ch-plot { height: 420px; }
    .ch-side { grid-template-columns: 1fr; }
    .ch-bar .ch-search { flex: 1 1 100%; }
    .ch-sdrop { width: 100%; }
    .ch-pop { right: auto; left: 0; width: min(300px, calc(100vw - 40px)); }
    .ch-t { font-size: 12.5px; }
    .ch-t td, .ch-t th { padding: 6px 5px; }
    .ch-rule canvas { height: 92px; }
}
.ch-lw.ch-hand, .ch-lw.ch-hand * { cursor: pointer !important; }

/* ---------- подстраницы: небольшие графики, тепловые таблицы, панель управления ---------- */
.ch-mini { position: relative; min-width: 0; border-radius: 8px; }
.ch-mini .ch-lw { position: absolute; inset: 0; }
.ch-mini .ch-plate .g span i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ch-heat td { text-align: center; font-weight: 600; }
.ch-heat th { text-align: center; }
.ch-legend2 { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.ch-legend2 i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ch-legend2 b { color: var(--text-color); font-family: var(--ch-mono); font-weight: 600; margin-left: 4px; }
.ch-tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-surface); margin-bottom: 12px; }
.ch-tbar .ch-search { flex: 0 1 320px; }
.ch-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-color); cursor: pointer; }
.ch-chk input { accent-color: var(--ch-ink); width: 15px; height: 15px; }
.ch-cap { font: 600 11px var(--ch-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); margin: 2px 0 8px; display: flex; justify-content: space-between; gap: 10px; }
.ch-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px) { .ch-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- мультичарт ---------- */
.mc-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mc-grid.mc-2x3, .mc-grid.mc-3x3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc-cell { border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-surface); min-width: 0; display: flex; flex-direction: column; }
.mc-head { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--ch-line); flex-wrap: wrap; }
.mc-head .ch-search { flex: 0 1 150px; }
.mc-head .ch-search-in { height: 32px; }
.mc-head .ch-search-in input { font-size: 13.5px; }
.mc-sym { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.mc-sym .ic { align-self: center; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ch-surface2); font: 700 9px var(--ch-mono); color: var(--ch-ink); }
.mc-sym .ic img { width: 100%; height: 100%; object-fit: cover; }
.mc-sym b { font: 700 15px 'Onest', sans-serif; color: var(--text-color); cursor: pointer; white-space: nowrap; }
.mc-sym .px { font: 600 15px var(--ch-mono); color: var(--text-color); }
.mc-sym .chg { font: 600 13px var(--ch-mono); }
.mc-tf, .mc-in { border: 1px solid var(--ch-line2); background: var(--ch-bg); color: var(--text-color); border-radius: 7px; padding: 4px 6px; font: 600 13px 'Onest', sans-serif; }
.mc-in { flex: 1; min-width: 0; padding: 6px 9px; }
.mc-go { color: var(--text-secondary); padding: 4px 6px; }
.mc-go:hover { color: var(--ch-ink); }
.mc-plot { height: 380px; }
.mc-1x2 .mc-plot { height: 460px; }
.mc-2x3 .mc-plot { height: 330px; }
.mc-3x3 .mc-plot { height: 290px; }
@media (max-width: 1000px) { .mc-grid.mc-2x3, .mc-grid.mc-3x3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mc-grid, .mc-grid.mc-2x3, .mc-grid.mc-3x3 { grid-template-columns: minmax(0, 1fr); } .mc-grid .mc-plot { height: 300px; } .mc-head .ch-search { flex: 1 1 100%; } }

/* ---------- сравнение ---------- */
.cp-lag { display: flex; align-items: flex-end; gap: 2px; height: 36px; padding-bottom: 1px; border-bottom: 1px solid var(--ch-line2); }
.cp-lag i { flex: 1; border-radius: 2px 2px 0 0; min-height: 3px; }

/* ---------- доходность ---------- */
.rt-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.rt-per tr[data-p] { cursor: pointer; }
.rt-per tr[data-p]:hover td { background: var(--ch-ink-wash); }
.rt-per tr.on td { background: var(--ch-ink-wash); }
.rt-per tr.on td:first-child { box-shadow: inset 3px 0 0 var(--ch-ink); }
.rt-per tr.rt-na td { color: var(--text-secondary); }
.rt-inv { display: flex; gap: 10px; flex-wrap: wrap; }
.rt-inv label { display: flex; flex-direction: column; gap: 4px; font: 600 11px var(--ch-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); flex: 1 1 140px; }
.rt-inv input { border: 1px solid var(--ch-line2); background: var(--ch-bg); color: var(--text-color); border-radius: 8px; padding: 7px 10px; font: 600 15px var(--ch-mono); color-scheme: dark; }
body.light .rt-inv input { color-scheme: light; }
.rt-yrs { display: flex; gap: 4px; height: 210px; }
.rt-yrs > div { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.rt-yrs .b { position: relative; flex: 1; width: 100%; border-bottom: 0; background: linear-gradient(var(--ch-line2), var(--ch-line2)) 0 50% / 100% 1px no-repeat; }
.rt-yrs .b i { position: absolute; left: 18%; right: 18%; border-radius: 3px; }
.rt-yrs .v { font: 600 11.5px var(--ch-mono); white-space: nowrap; }
.rt-yrs .y { font: 600 11.5px var(--ch-mono); color: var(--text-secondary); margin-top: 3px; }
.rt-hist { display: flex; gap: 3px; align-items: flex-end; height: 130px; border-bottom: 1px solid var(--ch-line2); }
.rt-hist > div { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.rt-hist i { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; }
.rt-hax { display: flex; justify-content: space-between; font: 600 11.5px var(--ch-mono); color: var(--text-secondary); margin-top: 3px; }
.rt-me td { background: var(--ch-ink-wash); }
@media (max-width: 1000px) { .rt-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .rt-yrs .v { font-size: 9.5px; } .rt-yrs .y { font-size: 9.5px; } }
.rt-ext td, .rt-ext td small { white-space: normal; }

/* ---------- сезонность ---------- */
.se-mx td, .se-mx th { padding: 6px 4px; font-size: 12.5px; }
.se-mx td:first-child { font-family: var(--ch-mono); }
.se-mx th.se-cur { color: var(--ch-mark); }
.se-mx td.se-live { outline: 1px dashed var(--ch-mark); outline-offset: -2px; }
.se-mx tr.se-sum td { font-weight: 600; background: var(--ch-surface2); }
.se-mx tr.se-sum td:first-child { font: 600 11px var(--ch-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.se-bars { display: flex; gap: 4px; height: 230px; }
.se-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; border-radius: 6px; padding: 2px 0; }
.se-bars > div.se-cur { box-shadow: inset 0 0 0 1px var(--ch-mark-line); }
.se-bars .b { position: relative; flex: 1; width: 100%; background: linear-gradient(var(--ch-line2), var(--ch-line2)) 0 50% / 100% 1px no-repeat; }
.se-bars .b i { position: absolute; left: 20%; right: 20%; border-radius: 3px; }
.se-bars .v { font: 600 11.5px var(--ch-mono); white-space: nowrap; }
.se-bars .y { font: 600 12px 'Onest', sans-serif; color: var(--text-color); margin-top: 3px; }
.se-bars .p { font: 600 11px var(--ch-mono); color: var(--text-secondary); }
.se-dots { position: relative; height: 26px; margin: 4px 0 2px; background: linear-gradient(var(--ch-line2), var(--ch-line2)) 0 50% / 100% 1px no-repeat; }
.se-dots i { position: absolute; top: 8px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ch-ink-line); }
.se-dots b { position: absolute; top: 3px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--ch-mark); }
.se-hrs { display: flex; gap: 3px; height: 190px; align-items: stretch; }
.se-hrs > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.se-hrs i { width: 100%; border-radius: 3px 3px 0 0; min-height: 0; }
.se-hrs span { font: 600 11px var(--ch-mono); color: var(--text-secondary); margin-top: 3px; }
.se-rel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.se-rel > div { padding: 9px 11px; border-radius: 9px; background: var(--ch-surface2); display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.se-rel small { font: 600 11.5px var(--ch-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.se-rel b { font: 600 18px var(--ch-mono); }
.se-rel span { font-size: 12.5px; color: var(--text-secondary); }

@media (max-width: 760px) { .se-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .se-hrs span { font-size: 8.5px; } .se-bars .v, .se-bars .p { font-size: 9px; } .se-bars .y { font-size: 10.5px; } }

/* ---------- повтор истории ---------- */
.rp-desk { grid-template-columns: minmax(0, 1fr) 300px; }
.rp-ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--ch-line); }
.rp-ctl .rp-play { min-width: 96px; justify-content: center; }
.rp-date { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); }
.rp-date input { border: 1px solid var(--ch-line2); background: var(--ch-bg); color: var(--text-color); border-radius: 8px; padding: 5px 8px; font: 600 13px var(--ch-mono); color-scheme: dark; }
body.light .rp-date input { color-scheme: light; }
.rp-guess { display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--ch-line); font-size: 14.5px; color: var(--text-color); background: var(--ch-ink-wash); }
.rp-guess.on { display: flex; }
.rp-guess > span { flex: 1 1 260px; }
.rp-guess .rp-up { border-color: var(--ch-up); color: var(--ch-up); font-size: 14px; padding: 8px 16px; }
.rp-guess .rp-up i { color: var(--ch-up); }
.rp-guess .rp-dn { border-color: var(--ch-dn); color: var(--ch-dn); font-size: 14px; padding: 8px 16px; }
.rp-guess .rp-dn i { color: var(--ch-dn); }
@media (max-width: 1200px) { .rp-desk { grid-template-columns: minmax(0, 1fr); } }

/* ---------- мои разметки ---------- */
.tp-filter { flex: 0 1 280px; height: 36px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tp-card { border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-bg); overflow: hidden; display: flex; flex-direction: column; }
.tp-card:hover { border-color: var(--ch-ink-line); }
.tp-cv { display: block; width: 100%; height: 150px; border-bottom: 1px solid var(--ch-line); background-image: linear-gradient(var(--ch-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ch-grid) 1px, transparent 1px); background-size: 20px 20px; }
.tp-meta { padding: 9px 11px; display: flex; flex-direction: column; gap: 7px; }
.tp-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tp-name .ic { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ch-surface2); font: 700 9px var(--ch-mono); color: var(--ch-ink); flex: 0 0 22px; }
.tp-name .ic img { width: 100%; height: 100%; object-fit: cover; }
.tp-name b { font: 700 15px 'Onest', sans-serif; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-cnt { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font: 600 12.5px var(--ch-mono); color: var(--text-color); }
.tp-cnt i { color: var(--ch-ink); margin-right: 4px; }
.tp-cnt em { margin-left: auto; font: 500 12px 'Onest', sans-serif; font-style: normal; color: var(--text-secondary); }
.tp-act { display: flex; gap: 6px; }
.tp-act a.ch-btn { flex: 1; justify-content: center; text-decoration: none; }
.tp-act .tp-arm { border-color: var(--ch-dn); color: var(--ch-dn); }
.tp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 30px 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.tp-empty > i { font-size: 30px; color: var(--ch-ink); }
.tp-empty b { font-size: 16px; color: var(--text-color); }
.tp-empty span { max-width: 560px; }
.tp-empty a { text-decoration: none; margin-top: 4px; }

/* вкладки каталога в выпадающем списке активов */
.ch-stabs { position: sticky; top: -6px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin: -6px -6px 4px; padding: 10px 10px 8px; background: var(--ch-plate); border-bottom: 1px solid var(--ch-line2); }
.ch-stabs button { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 1px solid var(--ch-line2); border-radius: 999px; background: transparent; color: var(--text-color); font: 600 14px 'Onest', sans-serif; cursor: pointer; }
.ch-stabs button small { font: 600 12px var(--ch-mono); color: var(--text-secondary); }
.ch-stabs button:hover { border-color: var(--ch-ink); }
.ch-stabs button.on { background: var(--ch-ink); border-color: var(--ch-ink); color: #0b1220; }
.ch-stabs button.on small { color: inherit; opacity: .75; }

/* «Показать ещё» — раскрытый хвост списка прокручивается внутри блока, а не тянет страницу вниз */
.ch-hid { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; margin-top: 2px; padding-right: 4px; border-top: 1px dashed var(--ch-line2); scrollbar-width: thin; }

/* строка данных свечи под курсором — вверху графика вместо окна у мышки */
.ch-legend .ch-ohlc { display: flex; flex-wrap: wrap; gap: 2px 8px; white-space: normal; font: 500 12.5px var(--ch-mono); color: var(--text-secondary); padding: 3px 8px; margin-left: -8px; border-radius: 6px; background: color-mix(in srgb, var(--ch-plate) 82%, transparent); width: max-content; max-width: 100%; }
.ch-legend .ch-ohlc em { font-style: normal; color: var(--text-color); font-weight: 600; margin-right: 4px; }
.ch-legend .ch-ohlc b { color: var(--text-color); font-weight: 600; margin-right: 4px; }
.ch-legend .ch-ohlc b.up { color: var(--ch-up); } .ch-legend .ch-ohlc b.down { color: var(--ch-dn); }
.ch-plate { min-width: 0; max-width: 300px; }

/* панель рисования по группам (chart-tools.js): уголок у кнопки группы — значит, есть список */
.ch-tools { max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.ch-tools .ch-tg { position: relative; }
.ch-tools .ch-tg em { position: absolute; right: 3px; bottom: 3px; width: 0; height: 0; border-left: 4px solid transparent; border-bottom: 4px solid currentColor; opacity: .55; }
.ch-fly { position: fixed; z-index: 90; width: 330px; max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border: 1px solid var(--ch-line2); border-radius: 12px; background: var(--ch-plate); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); scrollbar-width: thin; }
.ch-fly input { width: 100%; box-sizing: border-box; margin: 2px 0 6px; padding: 9px 12px; border: 1px solid var(--ch-line2); border-radius: 8px; background: var(--ch-surface); color: var(--text-color); font: 500 14px 'Onest', sans-serif; outline: 0; }
.ch-fly input:focus { border-color: var(--ch-ink); }
.ch-fly h6 { margin: 8px 8px 4px; font: 600 11px var(--ch-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.ch-fly button { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-color); font: 500 14px 'Onest', sans-serif; text-align: left; cursor: pointer; }
.ch-fly button i { color: var(--ch-ink); text-align: center; }
.ch-fly button:hover { background: var(--ch-ink-wash); }
.ch-fly button.on { background: var(--ch-ink-wash); box-shadow: inset 0 0 0 1px var(--ch-ink-line); }
.ch-fly kbd { font: 600 11px var(--ch-mono); color: var(--text-secondary); }
.ch-fly p { margin: 10px; color: var(--text-secondary); font-size: 13px; }
body.ch-fly-open .ix-tip { display: none !important; }

/* звёздочка избранного в строке поиска активов — общий список сайта (MXFav) */
.ch-sres { grid-template-columns: 30px minmax(0, 1fr) auto 30px; }
.ch-sfav { grid-column: 4; grid-row: 1 / span 2; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 15px; opacity: .55; }
.ch-sres:hover .ch-sfav { opacity: 1; }
.ch-sfav:hover { background: var(--ch-surface2); color: #d4af37; opacity: 1; }
.ch-sfav.on { color: #d4af37; opacity: 1; }

/* карточки блоков «Графика»: внутренний отступ — содержимое не липнет к рамке и не вылезает за неё (10.10.2026) */
.ch-page .sx-card { padding: 14px 16px; min-width: 0; }
.ch-page .sx-card .ch-t th { letter-spacing: .04em; padding: 6px 5px; }
.ch-page .sx-card .ch-t td { padding: 7px 5px; }
.ch-kv > span, .ch-kv > b { min-width: 0; overflow-wrap: anywhere; }
.ch-page .sx-card .ic img, .ch-sym .ic img { width: 100%; height: 100%; object-fit: cover; }

/* панель рисования не должна растягивать рабочее место: её высота = высота графика, лишнее прокручивается (10.10.2026) */
@media (min-width: 761px) {
    .ch-plotw { display: flex; flex-direction: column; min-width: 0; }
    .ch-plotw > .ch-plot { flex: 1 1 auto; height: auto; min-height: 620px; }
    .ch-tools { height: 0; min-height: 100%; box-sizing: border-box; overflow-y: auto; gap: 1px; padding: 6px 5px; }
    .ch-tools button { height: 29px; flex: 0 0 29px; }
    .ch-tools hr { margin: 3px 3px; }
}
