/* «Тренд» в «Обзоре» — идеи 8L_ASC (волна 167, 28.10.2026). Токены — общие со styles.css. */
#ov-trend, .tr-root, .tr-page { display: grid; gap: 10px; }
.tr-top { gap: 8px; }
.tr-title { font-size: 14px; }
.tr-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tr-chk { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.tr-muted { color: var(--text-muted); font-size: 12px; }
.tr-sec { display: grid; gap: 8px; }
.tr-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tr-card { gap: 5px; font-size: 13px; }
.tr-card.tr-pending { border-left: 3px solid var(--accent, #3b82f6); }
.tr-card.tr-open { border-left: 3px solid #f59e0b; }
.tr-card.tr-closed { opacity: .85; }
.tr-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.tr-tk { font-weight: 700; font-size: 15px; }
.tr-side { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 6px; }
.tr-long { background: rgba(38, 166, 154, .16); color: #4fd1c5; }
.tr-short { background: rgba(239, 83, 80, .16); color: #ff8a80; }
.tr-tf { font-size: 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; }
.tr-px { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.tr-main { line-height: 1.4; }
.tr-lv { color: var(--text); font-size: 12px; line-height: 1.4; }
.tr-note { color: var(--text-muted); font-size: 12px; }
.tr-warn { color: #d97706; font-weight: 600; }
.tr-up { color: #4fd1c5; }
.tr-dn { color: #ff8a80; }
.tr-foot { border-top: 1px dashed var(--border); padding-top: 4px; }
.tr-rules p { margin: 6px 0; }
/* Светлая тема — тёмнее, чтобы хватало контраста на белом */
[data-theme="light"] .tr-long, [data-theme="light"] .tr-up { color: #0f766e; }
[data-theme="light"] .tr-short, [data-theme="light"] .tr-dn { color: #c62828; }
[data-theme="light"] .tr-warn { color: #b45309; }
/* 168 (28.10.2026): карточка в раскладке «Внутри дня» (ov-s2), страница идеи */
.tr-card.ov-s2 { display: flex; flex-direction: column; cursor: pointer; }
.tr-card.ov-s2:hover { border-color: var(--accent, #3b82f6); }
.tr-card .ov-s2-kv { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.tr-grid.ov-s2-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.ov-s2 .tr-st-pending { color: #3b82f6; background: rgba(59, 130, 246, .12); }
.ov-s2 .tr-st-open { color: #f59e0b; background: rgba(245, 158, 11, .14); }
.ov-s2 .tr-st-closed { color: var(--text-muted); }
.tr-core-band { fill: rgba(245, 158, 11, .16); stroke: rgba(245, 158, 11, .5); stroke-width: .6; vector-effect: non-scaling-stroke; }
.tr-sl-in, .tr-sl-st, .tr-sl-tg { stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.tr-sl-in { stroke: #3b82f6; }
.tr-sl-st { stroke: #f97316; stroke-dasharray: none; }
.tr-sl-tg { stroke: #10b981; stroke-dasharray: 2 3; }
button.tr-tfc { background: none; font: inherit; font-size: 11px; cursor: pointer; }
button.tr-tfc:hover { border-color: var(--accent, #3b82f6); color: var(--text); }
.tr-box-stop b.tr-warn { font-size: 14px; }
.tr-pbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-ph { display: flex; flex-direction: column; }
.tr-ph .ov-s2-kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tr-lw-wrap { height: clamp(340px, 56vh, 620px); }
.tr-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--text-muted); align-items: center; }
.tr-lg { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 5px; }
.tr-lg-core { border-color: rgba(245, 158, 11, .95); }
.tr-lg-r { border-color: rgba(38, 166, 154, .8); border-top-style: dashed; }
.tr-lg-s { border-color: rgba(239, 83, 80, .8); border-top-style: dashed; }
.tr-lg-in { border-color: #3b82f6; border-top-style: dashed; }
.tr-lg-st { border-color: #f97316; }
.tr-tbl-wrap { overflow-x: auto; }
.tr-tbl { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.tr-tbl th { text-align: left; font-weight: 600; color: var(--text-muted); padding: 4px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tr-tbl td { padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
/* 168b (28.10.2026): открытая сейчас сделка — первой строкой и с подсветкой, чтобы не путать с прошлой */
.tr-row-open td { background: rgba(59, 130, 246, .08); }
.tr-mk-l { color: #16a34a; font-weight: 700; }
.tr-mk-s { color: #dc2626; font-weight: 700; }
.tr-tbl .tr-num { text-align: right; white-space: nowrap; }
/* 169 (28.10.2026): опционы под идею — серия за серией, таблица конструкций */
.tr-os { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.tr-os-h { margin-bottom: 4px; }
.tr-otbl td .ov-btn { white-space: nowrap; }
.tr-onote { margin-top: 8px; font-size: 12px; }
/* 169: широкая таблица прокручивается внутри блока, а не раздвигает страницу на телефоне */
.tr-root, .tr-page, .tr-opts { min-width: 0; max-width: 100%; }
.tr-opts { overflow: hidden; display: block; }   /* у ov-card сетка: её колонка росла по ширине таблицы */
.tr-opts > *, .tr-os > * { min-width: 0; }
.tr-opts .tr-tbl-wrap { max-width: 100%; }
@media (max-width: 560px) {
    .tr-grid { grid-template-columns: 1fr; }
    .tr-px { margin-left: 0; width: 100%; }
    .tr-card .ov-s2-kv, .tr-ph .ov-s2-kv { grid-template-columns: 1fr 1fr; }
    .tr-card .ov-s2-kv .ov-s2-box:nth-child(3), .tr-ph .ov-s2-kv .ov-s2-box:nth-child(3) { grid-column: 1 / -1; }
    .tr-lw-wrap { height: clamp(300px, 52vh, 460px); }
}

/* 174z (31.10.2026): «Способы под идею» — подзаголовки и панель фильтров */
.tr-way-h { margin: 12px 0 4px; font-size: 14px; }
.tr-flt { margin-top: 6px; }
/* Как во «Внутри дня»: на компьютере выборы видны всегда, на телефоне — под кнопкой */
@media (max-width: 600px) { .tr-flt:not(.is-open) { display: none; } }
.tr-flt .ov-sit-sel { margin-right: 10px; }
