/* xbonds.ru — фирменная палитра из логотипа (вариант A «Свеча и рост»).
   Графит #18212C · Зелёный рост #1E8F5E · Сталь #7A8494 · Туман #F5F6F8 · Иней #EEF1F5 · Ночь #141B24.
   Для мелкого текста сталь и зелёный взяты на ступень темнее (#66717F, #17784E): контраст не ниже 4,5:1.
   Все цвета — токены. Страницы и графики читают их из CSS, поэтому тёмная тема работает везде. */
:root {
  --font: "Inter", Arial, Helvetica, sans-serif;
  --logo-font: "Manrope", "Segoe UI", Arial, sans-serif;
  --brand-ink: #18212C;     /* Графит — текст, кнопки, основные серии */
  --brand: #1E8F5E;         /* Зелёный рост — купоны, рост, акценты */
  --brand-steel: #7A8494;   /* Сталь — «.ru», оси, вторичные серии, дивиденды */
  --brand-mist: #F5F6F8;    /* Туман — шапки таблиц, нейтральные теги */
  --brand-frost: #EEF1F5;   /* Иней — фон страницы */
  --brand-night: #141B24;   /* Ночь — полоса навигации */
  --brand-tint: #E8F4EE;    /* мятная заливка: наведение, плюсовые теги */
  --bg: var(--brand-frost);
  --panel: #ffffff;
  --panel-2: var(--brand-mist);
  --line: #dde1e7;
  --line-strong: #c3c9d2;
  --text: var(--brand-ink);
  --muted: #66717F;
  --accent: var(--brand-ink);
  --accent-2: #2E3A48;
  --on-ink: #ffffff;        /* текст на графитовой кнопке */
  --good: #17784E;
  --good-bg: var(--brand-tint);
  --good-line: #BCDCCB;
  --ok-fg: #145C3D;
  --bad: #b5483a;
  --bad-bg: #f6e3e1;
  --bad-line: #ecc3bb;
  --err-bg: #fbeeea;
  --err-fg: #7d2f22;
  --warn-bg: #f6eddb;
  --warn-fg: #85590f;
  --warn-line: #ecd3ae;
  --info-bg: #e6edf5;
  --info-fg: #2c4a6b;
  --field-bg: #ffffff;
  --chart-fill: rgba(24, 33, 44, 0.08);
  --chart-grid: #e6e8ee;
  --s-invested: #C3C9D2;    /* вложено, ещё не заработано */
  --s-reinv: #7FC9A3;       /* реинвестировано — мята */
  --shadow: rgba(20, 30, 45, 0.04);
  --logo-ink: #18212C;
  --logo-accent: #1E8F5E;
  --logo-tld: #7A8494;
  color-scheme: light;
}
/* Тёмная тема: только по переключателю «Тема» в шапке (по умолчанию светлая у всех) */
:root[data-theme="dark"] {
    --bg: #0F151D;
    --panel: #18212C;
    --panel-2: #1E2936;
    --brand-ink: #E6EAF0;
    --brand: #2FB37A;
    --brand-steel: #8A94A3;
    --brand-mist: #1E2936;
    --brand-frost: #0F151D;
    --brand-night: #0A0F15;
    --brand-tint: #15302A;
    --line: #2A3544;
    --line-strong: #3A4656;
    --text: #E6EAF0;
    --muted: #97A1B0;
    --accent: #E6EAF0;
    --accent-2: #B9C2CF;
    --on-ink: #141B24;
    --good: #5FD19A;
    --good-bg: #15302A;
    --good-line: #24503D;
    --ok-fg: #5FD19A;
    --bad: #EE8A7C;
    --bad-bg: #3A1F1C;
    --bad-line: #5A3430;
    --err-bg: #3A1F1C;
    --err-fg: #F1A89B;
    --warn-bg: #352A16;
    --warn-fg: #E9B866;
    --warn-line: #6B4F1D;
    --info-bg: #1D2B3D;
    --info-fg: #9DBBDD;
    --field-bg: #0F151D;
    --chart-fill: rgba(230, 234, 240, 0.08);
    --chart-grid: #2A3544;
    --s-invested: #3A4656;
    --s-reinv: #7FC9A3;
    --shadow: rgba(0, 0, 0, 0.3);
    --logo-ink: #EEF1F5;
    --logo-accent: #2FB37A;
    --logo-tld: #8A94A3;
    color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Шапка ---------- */
header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
}
header .brand {
  display: inline-block;
  padding-top: 16px;
  font-size: 30px;
  color: var(--brand-ink);
  text-decoration: none;
}

/* ---------- Логотип: векторная надпись xbonds.ru, v — стрелка роста, t — свеча ---------- */
.logo {
  display: inline-block;
  font-family: var(--logo-font);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--logo-ink);
}
.logo svg { height: 1.1em; width: auto; display: inline-block; vertical-align: -0.13em; overflow: visible; }
.logo .lg-k, .logo .lg-a, .logo .lg-ts { fill: none; }
.logo .lg-k { stroke: var(--logo-ink); }
.logo .lg-kf { fill: var(--logo-ink); }
.logo .lg-a { stroke: var(--logo-accent); }
.logo .lg-af { fill: var(--logo-accent); }
.logo .lg-ts { stroke: var(--logo-tld); }
.logo .lg-tf { fill: var(--logo-tld); }

/* Страница входа: крупный логотип над формой */
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 28px 0 22px; text-align: center; }
.login-brand .logo { font-size: 54px; }
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-card { max-width: 420px; margin: 0 auto; }

main { max-width: 1320px; margin: 28px auto 48px; padding: 0 20px; }   /* одна ширина и одни боковые поля на всех страницах */

/* ---------- Заголовки ---------- */
h1, h2, h3 { font-family: var(--font); font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
h2 { font-size: 20px; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 0 0 12px; }

/* ---------- Карточки (светлее фона) ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px var(--shadow);
}
.card .muted { margin-top: 10px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.kpi {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}
.kpi.good, .good { color: var(--good); }
.bad { color: var(--bad); }

.muted { color: var(--muted); font-size: 12px; }

/* ---------- Таблицы ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 8px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel-2);
}
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td.num, th.num { text-align: right; white-space: nowrap; }
tr:hover td { background: var(--panel-2); }

/* ---------- Формы ---------- */
label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
input, select {
  width: 100%;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--good-bg);
}
input[type="checkbox"] { width: auto; accent-color: var(--brand); }

button {
  margin-top: 10px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background: var(--accent-2); border-color: var(--accent-2); }
button[type="button"] {
  margin-top: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
button[type="button"]:hover { background: var(--panel-2); border-color: var(--muted); }
a { color: var(--accent-2); }

/* ---------- Сообщения ---------- */
.err, .ok {
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  border-radius: 4px;
  border-left: 3px solid;
}
.err { background: var(--err-bg); border-color: var(--bad); color: var(--err-fg); }
.ok  { background: var(--good-bg); border-color: var(--brand); color: var(--ok-fg); }

/* ---------- Калькулятор: карточки и строки ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; white-space: nowrap; }
.sec {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 2px;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }

.pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
}
.pill.past { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.pill.future { color: var(--accent-2); border-color: var(--line-strong); background: var(--panel-2); }

details { margin-top: 10px; }
details summary {
  cursor: pointer;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
}

canvas { max-height: 340px; }
ul li { margin-bottom: 4px; }

/* ---------- Телефон ---------- */
@media (max-width: 640px) {
  header { padding: 0 16px; }
  header .brand { font-size: 25px; padding-top: 13px; }
  .login-brand .logo { font-size: 44px; }
  main { margin-top: 16px; padding: 0 12px; }
  h2 { font-size: 18px; }
  .card { padding: 16px 14px; }
  .kpi { font-size: 20px; }
  table { font-size: 12px; }
  td, th { padding: 8px 4px; }
}

/* ---------- Статистика портфеля: главное сверху, группы ниже ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.tile {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}
.tile-label { font-size: 12px; color: var(--muted); }
.tile-value { font-size: 20px; font-weight: 600; margin-top: 4px; color: var(--text); }
.tile-note { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 28px;
}
.stat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin: 14px 0 4px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.stat-groups .kv { font-size: 13px; padding: 7px 0; }
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 11px 12px; }
  .tile-value { font-size: 16px; }
  .stat-groups { grid-template-columns: 1fr; }
}

/* ---------- Полоса переключателей над статистикой ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.chip {
  margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 500;
  border-radius: 999px; background: var(--panel); color: var(--muted);
  border: 1px solid var(--line-strong);
}
.chip.on { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }
.chip:hover { border-color: var(--accent-2); }
.chip-ghost {
  margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 500;
  background: transparent; color: var(--accent-2); border: 1px dashed var(--line-strong);
  border-radius: 999px;
}

/* ---------- Статистика: главные показатели выделены ---------- */
.stat-table tr.key td {
  background: var(--brand-frost);
  font-weight: 600;
  color: var(--text);
}
.stat-table tr.key td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
.stat-table tr.key td.muted { color: var(--accent-2); font-weight: 400; }

/* ---------- Статистика: галочка выделения ---------- */
.stat-table th.chk, .stat-table td.chk { width: 40px; text-align: center; padding-left: 10px; padding-right: 4px; }
.stat-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; margin: 0; }

/* ---------- Подразделы статистики ---------- */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.subtab {
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel); color: var(--muted); text-decoration: none;
}
.subtab:hover { color: var(--text); }
.subtab.on { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }

/* ---------- Сводка по выпускам: колонки по содержимому, без лишних пробелов ---------- */
.issues-wrap { width: 100%; overflow-x: auto; }
.issues-table { font-size: 12px; }
.issues-table th {
  white-space: normal;
  line-height: 1.25;
  vertical-align: bottom;
  padding: 8px 6px;
  font-size: 10px;
}
.issues-table td {
  padding: 8px 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.issues-table td:first-child { white-space: normal; }
.issues-table tr:last-child td { font-weight: 600; border-bottom: none; }
@media (max-width: 900px) {
  .issues-table { min-width: 760px; }
}

/* ---------- Покупки и счета: компактная форма и характеристики ---------- */
.trade-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.trade-layout > .card { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid label { margin-top: 10px; }
.cost-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-top: 24px; }
.cost-box .big { font-size: 18px; font-weight: 600; margin-top: 2px; }
.info-panel {
  margin-top: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px;
}
.info-panel .kv { padding: 6px 0; }
.info-panel .err { grid-column: 1 / -1; margin: 0; }
@media (max-width: 900px) {
  .trade-layout { grid-template-columns: 1fr; }
  .info-panel, .form-grid { grid-template-columns: 1fr; }
  .cost-box { margin-top: 0; }
}

/* ---------- Покупки: две равные колонки — форма слева, характеристики справа ---------- */
.trade-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.trade-layout > .card { margin-bottom: 0; }
.trade-layout .form-grid { grid-template-columns: 1fr; }
.trade-layout .info-panel {
  display: block; margin-top: 0; background: transparent; border: none; padding: 0;
}
.trade-layout .info-panel .kv { padding: 7px 0; }
@media (max-width: 900px) {
  .trade-layout { grid-template-columns: 1fr; }
  .trade-layout .form-grid { grid-template-columns: 1fr; }
}


/* ==================== runvst 1.0: шапка с разделами, метки данных, служебные элементы ==================== */
header .brandrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
header .ver { font-size: 11px; color: var(--muted); }
button.linklike, button.linklike:hover { background: none; border: 0; margin: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
button.ghost { background: var(--panel); color: var(--accent); border-color: var(--line-strong); }
button.ghost:hover { background: var(--panel-2); border-color: var(--muted); }
.faq-q { display: inline-block; margin: 8px 0 0 6px; width: 20px; height: 20px; line-height: 18px; text-align: center;
  border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.t-ok { background: var(--good-bg); color: var(--good); }
.t-warn { background: var(--warn-bg); color: var(--warn-fg); }
.t-no { background: var(--bad-bg); color: var(--bad); }
.t-info { background: var(--info-bg); color: var(--info-fg); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 8px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }
pre.code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; overflow-x: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.inline-form { margin-top: 10px; }
.inline-form p { margin: 0 0 8px; }
.inline-form input { display: inline-block; width: auto; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.wrap-x { width: 100%; overflow-x: auto; }
.nodata { border: 1px dashed var(--line-strong); border-radius: 6px; padding: 14px; color: var(--muted); background: var(--panel-2); }
@media (max-width: 640px) {
  header { padding: 0 16px; }
}

/* Широкие таблицы портфеля прокручиваются внутри карточки, страница не шире экрана */
main .card { overflow-x: auto; }


/* ==================== 1.1: скринер ==================== */
.scr { display: grid; gap: 0; }
.scr h1 { font-size: 22px; margin: 0; }
.scr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.scr-head input[type="search"] { width: 260px; max-width: 100%; }
.scr-sub { margin: 4px 0 0; max-width: 80ch; font-size: 13px; }
.scr .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.scr .tabs button, .scr .tabs button:hover { all: unset; cursor: pointer; padding: 8px 14px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.scr .tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.scr .fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; }
.scr .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.scr .i { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; color: var(--muted); cursor: help; text-transform: none; letter-spacing: 0; }
.scr .chips { margin-bottom: 0; gap: 6px; }
.scr .chip, .scr .chip:hover { font: inherit; font-size: 13px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); cursor: pointer; }
.scr .chip[aria-pressed="true"] { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }
.scr .checks { display: grid; gap: 6px; }
.scr .checks label { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400; cursor: pointer; }
.scr .checks label.off { color: var(--muted); cursor: not-allowed; }
.scr .range { display: flex; gap: 6px; align-items: center; }
.scr .range input { width: 86px; margin: 0; }
.scr .goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.scr .goal, .scr .goal:hover { all: unset; cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: grid; gap: 6px; }
.scr .goal.on, .scr .goal:focus-visible { border-color: var(--accent); }
.scr .goal .gi { width: 32px; height: 32px; border-radius: 6px; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; color: var(--accent-2); }
.scr .goal b { font-size: 15px; }
.scr .goal span { color: var(--muted); font-size: 12px; }
.scr .scr-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.scr .scr-bar h2 { margin: 0; }
.scr-table { min-width: 0; font-size: 12px; }
.scr-table th, .scr-table td { padding: 8px 5px; }
.scr-table th { letter-spacing: 0.02em; font-size: 10px; vertical-align: bottom; }
.scr-table th.num { white-space: normal; }
.scr-table td:first-child { min-width: 150px; }
/* ширина main теперь общая (см. выше) */
.bt-table .mini { font-size: 11px; color: var(--muted); }
.bt-table .rt { font-weight: 600; }
.bt-table .flag3 { color: var(--bad); font-size: 11px; font-weight: 600; }
.bt-table .flagq { color: var(--muted); font-size: 11px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }
.bt-table a.scr-name { color: inherit; text-decoration: none; }
.bt-table a.scr-name:hover { text-decoration: underline; }
.scr-table th button.th, .scr-table th button.th:hover { all: unset; cursor: pointer; }
.scr-table th button.th::after { content: " ↕"; opacity: .35; }
.scr-table th.s-asc button.th::after { content: " ↑"; opacity: 1; }
.scr-table th.s-desc button.th::after { content: " ↓"; opacity: 1; }
.scr-table td { vertical-align: middle; }
.scr .mini { font-size: 11px; color: var(--muted); }
.scr .rt { font-weight: 600; }
.scr .flag3 { color: var(--bad); font-size: 11px; font-weight: 600; }
button.linklike.inline { padding: 0; color: var(--accent-2); text-decoration: underline; }
.scr button:focus-visible, .scr input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.scr input:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; opacity: .7; }

/* ---------- 1.2: карточка выпуска. Своя раскладка: паспорт слева, таблицы без плиток ---------- */
.cardx{max-width:none;margin:0 auto}
.cardx-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:flex-end;border-bottom:2px solid var(--accent);padding-bottom:10px;margin-bottom:14px}
.cardx-head h1{margin:2px 0 0;font-size:24px}
.cardx-back{font-size:13px;color:var(--muted);text-decoration:none}
.cardx-sub{color:var(--muted);font-size:14px}
.cardx-ids{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13px}
.cardx-isin{font-family:ui-monospace,Menlo,Consolas,monospace;color:var(--accent)}
.cardx-board{border:1px solid var(--line);padding:1px 7px}
.cardx-ext{color:var(--accent)}
/* Кнопки действий выпуска: графит — основное действие, контурная — второстепенное; зелёный — при наведении */
.cardx-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:8px;border:1px solid var(--brand-ink);
  font:600 13px/1.2 var(--font);text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s,color .15s,box-shadow .15s}
.cardx-btn svg{width:15px;height:15px;flex:none}
.cardx-btn--primary{background:var(--brand-ink);color:var(--on-ink)}
.cardx-btn--primary:hover{background:var(--brand);border-color:var(--brand);color:var(--on-ink);box-shadow:0 3px 10px var(--good-line)}
.cardx-btn--ghost{background:var(--panel);color:var(--brand-ink);border-color:var(--line-strong)}
.cardx-btn--ghost:hover{background:var(--brand-tint);border-color:var(--brand);color:var(--good)}
.cardx-btn:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.cardx-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:14px;align-items:start}
.cardx-side{display:flex;flex-direction:column;gap:14px;min-width:0}
@media (max-width:760px){.cardx-grid{grid-template-columns:1fr}}
.cardx h2{font-size:15px;margin:0 0 8px;letter-spacing:.2px}
.cardx-bar{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.cardx dl{display:grid;grid-template-columns:minmax(0,1fr) auto;margin:0;font-size:14px}
.cardx dt,.cardx dd{margin:0;padding:6px 0;border-bottom:1px dotted var(--line)}
.cardx dt{color:var(--muted)}
.cardx dd{text-align:right;font-variant-numeric:tabular-nums}
.cardx-list{margin:0;padding-left:18px;font-size:14px}
.cardx-list li{margin-bottom:6px}
.cardx-table{width:100%;border-collapse:collapse;font-size:14px}
.cardx-table th,.cardx-table td{padding:7px 8px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
.cardx-table th{font-size:12px;color:var(--muted);font-weight:500;text-transform:uppercase;letter-spacing:.3px}
.cardx-table .num{text-align:right;font-variant-numeric:tabular-nums}
.cardx-table tr.base td{background:var(--bg);font-weight:600}
.cardx-table tr.past td{color:var(--muted)}
.cardx-table .up{color:var(--good)}
.cardx-table .down{color:var(--bad)}
.cardx-scroll{max-height:360px;overflow-y:auto}
.cardx .note{font-size:12.5px;color:var(--muted);margin:8px 0 0}
.scr-name{color:inherit;text-decoration:none}
.scr-name:hover b{text-decoration:underline}
.cardx-about .cardx-issuer{font-size:16px;font-weight:600;margin:0 0 8px}

.cardx-src{font-size:12.5px}
.cardx-h3{font-size:14px;margin:14px 0 6px}
.cardx .ok-msg{color:var(--good)}
.cardx .err-msg{color:var(--bad)}
.scr-form{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin:10px 0}
.scr-form label{display:flex;flex-direction:column;font-size:13px;color:var(--muted)}
.scr-form input{min-width:180px}

.cardx-charts{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:760px){.cardx-charts{grid-template-columns:1fr}}
.cardx-chart-title{font-size:13px;color:var(--muted);margin:0 0 6px}
.cardx-canvas{position:relative;height:240px;width:100%}

.cardx-tf{display:flex;flex-wrap:wrap;gap:6px}
.cardx-tf button.on{background:var(--sel);color:var(--panel)}
.cardx-price-sub{margin:-4px 0 8px;font-size:12.5px}
.hist-top{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin:4px 0 12px}
.hist-now{min-width:0}
.hist-now strong{display:block;font-size:30px;line-height:1.15;font-variant-numeric:tabular-nums}
.hist-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 18px;margin:0;min-width:0;flex:1 1 460px}
.hist-facts div{min-width:0}
.hist-facts dt{font-size:12px;color:var(--muted)}
.hist-facts dd{margin:2px 0 0;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}
.hist-facts small{display:block;font-size:12px}
.hist-canvas{position:relative;height:340px;width:100%;min-width:0}
.hist-range{align-items:center}
@media (max-width:700px){.hist-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
#history:fullscreen{background:var(--panel);padding:16px;overflow:auto;display:flex;flex-direction:column}
#history:fullscreen .hist-canvas{flex:1;height:auto;min-height:60vh}
.cardx-q{border-top:1px solid var(--line);padding:10px 0}
.cardx-q p{margin:4px 0}
.cardx-a{margin-top:8px}
.cardx-answer{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin-top:8px}
.cardx-answer textarea{flex:1 1 320px;min-height:60px;font:inherit;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--accent)}
.cardx-ask-label{flex:1 1 320px;display:flex;flex-direction:column;font-size:13px;color:var(--muted)}
.cardx-err{color:var(--bad)}

.kb-hints{margin:8px 0}
.kb-title{font-size:13px;color:var(--muted);margin:0 0 4px}
.kb-item{border:1px solid var(--line);border-radius:6px;padding:8px 10px;margin-bottom:6px;font-size:13.5px}
.kb-item p{margin:4px 0}
.kb-item a{font-size:13px}
.kb-form{display:flex;flex-direction:column;gap:8px;max-width:720px}
.kb-form label{display:flex;flex-direction:column;font-size:13px;color:var(--muted)}
.kb-form input,.kb-form textarea{font:inherit;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--accent)}
.kb-form button{align-self:flex-start}

/* Акции: ссылка-кнопка выгрузки и ссылки-заголовки сортировки */
a.ghost { display: inline-block; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; background: var(--panel); color: var(--accent); border: 1px solid var(--line-strong); }
a.ghost:hover { background: var(--panel-2); }
.scr-table th a.th { color: inherit; text-decoration: none; }
.scr-table th a.th::after { content: " ↕"; opacity: .35; }
.scr-table th.s-asc a.th::after { content: " ↑"; opacity: 1; }
.scr-table th.s-desc a.th::after { content: " ↓"; opacity: 1; }

/* Акции: карточка акции и ввод показателей */
.st-head h1 { margin: 6px 0 4px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.st-quote { margin-top: 14px; }
.st-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.st-tile .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.st-tile .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.st-tile .v.good { color: var(--good); }
.st-tile .v.bad { color: var(--bad); }
.st-tile .s { font-size: 12px; color: var(--muted); }
.st-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.st-tf { display: flex; gap: 6px; }
.st-src { margin-top: 10px; }
.stock-link { text-decoration: none; color: inherit; }
.stock-link:hover b { text-decoration: underline; }
.scr-bar-links { display: flex; gap: 8px; flex-wrap: wrap; }
.st-tf a { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; text-decoration: none; color: var(--muted); }
.st-tf a.on { background: var(--sel); color: var(--panel); border-color: var(--sel); }
.st-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.st-btn { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); cursor: pointer; }
.st-btn:hover { background: var(--panel-2); }
.st-btn.on { background: var(--sel); color: var(--panel); border-color: var(--sel); }
.st-btn:disabled { opacity: .4; cursor: not-allowed; }
.st-chart-card { min-width: 0; }
.st-canvas { position: relative; height: 340px; width: 100%; margin-top: 12px; }
@media (max-width: 600px) { .st-canvas { height: 260px; } }

/* История цены: периоды длиннее истории выпуска */
.hist-range button:disabled { opacity: .4; cursor: not-allowed; }

/* Пошаговая синхронизация на «Обслуживании» */
.sync-steps { margin: 12px 0 0; padding-left: 20px; font-size: 13px; display: grid; gap: 4px; }
.sync-steps li.ok { color: var(--good); font-weight: 600; }
.sync-steps li.bad { color: var(--bad); }

/* Калькуляторы доходности (раздел «Облигации») */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; margin-top: 14px; align-items: end; }
.calc-grid label { margin: 0; min-width: 0; }
.calc-grid input, .calc-grid select { width: 100%; }
.calc-wide { grid-column: 1 / -1; min-width: 0; }
.calc-lab { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.calc-items { display: grid; gap: 8px; }
.calc-item { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.calc-item select { min-width: 0; }
.calc-table { max-height: 560px; overflow-y: auto; }
.calc-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.calc-table tr.calc-final td { font-weight: 600; background: var(--bg); }
.calc-bars { height: 260px; }
.st-grid.calc-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .st-grid.calc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .calc-item { grid-template-columns: minmax(0, 1fr) 72px; } .calc-bars { height: 220px; } }
/* Выбор выпуска в калькуляторе: поле на две колонки формы, список под полем */
[hidden] { display: none !important; }          /* атрибут hidden сильнее display у классов (.st-grid и др.) */
main .card.calc-form { overflow: visible; }      /* список выпусков выходит за край карточки */
.calc-pick { max-width: calc(50% - 8px); min-width: 0; }
.calc-pick > label { margin: 0 0 6px; }
.calc-combo { position: relative; }
.calc-dd { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 340px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.calc-dd li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.calc-dd li b { color: var(--text); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.calc-dd li span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.calc-dd li.on, .calc-dd li[data-i]:hover { background: var(--panel-2); }
.calc-dd li.calc-dd-note { color: var(--muted); font-size: 12px; cursor: default; }
.calc-hint { margin: 6px 0 0; font-size: 12px; color: var(--bad); }
@media (max-width: 760px) { .calc-pick { max-width: none; } }

/* ---------- Знак изменения: рост / снижение ---------- */
.up { color: var(--good); }
.down { color: var(--bad); }
.st-tile .s.good { color: var(--good); }
.st-tile .s.bad { color: var(--bad); }
.chip { cursor: pointer; }
button.chip[aria-pressed="true"], button.chip[aria-pressed="true"]:hover { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }

/* ---------- Раздел «Рынок» ---------- */
.mk-head h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.02em; }
.mk-sub { margin: 0 0 16px; max-width: 75ch; font-size: 13px; }
.st-grid.mk-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 16px; }
.mk-tiles .st-tile .v { font-size: 22px; }
@media (max-width: 1000px) { .st-grid.mk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .st-grid.mk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mk .st-bar h2 { margin: 0; }
.mk-asof { font-size: 12px; }
.mk-lead { margin: 10px 0 0; font-size: 15px; max-width: 80ch; }
.mk-canvas { height: 420px; }
@media (max-width: 600px) { .mk-canvas { height: 320px; } }
.mk-more { margin-top: 14px; }
.mk-more summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
.mk-table td, .mk-table th { white-space: nowrap; }
.mk-series { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mk-dyn-sum { margin: 12px 0 0; font-size: 14px; min-height: 21px; }
.mk-periods .st-btn { padding: 5px 10px; }

/* ---------- Портфель → «Акции» ---------- */
.st-grid.pfs-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .st-grid.pfs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ghost-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 8px; }
.ghost-link:hover { background: var(--panel-2); }
.mini { font-size: 11px; line-height: 1.35; }
.pfs-table td { vertical-align: middle; }
.pfs-table tfoot td { border-top: 2px solid var(--line-strong); border-bottom: none; }
.pfs-table tr.past td { color: var(--muted); }
.pfs-share { min-width: 120px; white-space: nowrap; }
.pfs-share span:last-child { font-size: 12px; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.pfs-bar { display: inline-block; height: 8px; max-width: 70px; background: var(--accent-2); border-radius: 2px; vertical-align: middle; }
.pfs-side { display: flex; gap: 18px; }
.pfs-side label { margin: 0; color: var(--text); font-size: 14px; }
.pfs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.pfs-grid label { margin-top: 12px; }
@media (max-width: 760px) { .pfs-grid { grid-template-columns: 1fr; } }
button.linklike.danger { color: var(--bad); padding: 0; margin: 0; font-size: 12px; }
.pfs-table form { margin: 0; }

/* ---------- Календарь ---------- */
.cal-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 0 0 16px; }
.cal-controls .mk-series { margin: 0; }
.cal-controls a.chip { text-decoration: none; display: inline-block; }
.cal-controls a.chip[aria-pressed="true"], .cal-controls a.chip[aria-pressed="true"]:hover { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }
.cal-ics { margin-left: auto; }
a.st-btn { text-decoration: none; display: inline-block; }
.cal-canvas { height: 240px; }
.cal-month { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cal-month:first-child { margin-top: 0; }
.cal-day { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cal-day.today { background: linear-gradient(90deg, var(--panel-2), transparent 60%); }
.cal-date { display: flex; flex-direction: column; line-height: 1.15; padding-left: 4px; }
.cal-date b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-date span { font-size: 12px; color: var(--muted); }
.cal-date em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal-ev { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cal-ev.mk .cal-what b { font-weight: 500; }
.cal-badge { font-size: 11px; font-weight: 600; text-align: center; padding: 3px 0; border-radius: 4px; border: 1px solid; }
.cal-badge.t-coupon { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.cal-badge.t-redeem { color: var(--on-ink); border-color: var(--brand-ink); background: var(--brand-ink); }
.cal-badge.t-offer { color: var(--warn-fg); border-color: var(--warn-line); background: var(--warn-bg); }
.cal-badge.t-div { color: var(--brand-ink); border-color: var(--line-strong); background: var(--panel-2); }
.cal-what { min-width: 0; }
.cal-what a { color: var(--text); text-decoration: none; }
.cal-what a:hover { text-decoration: underline; }
.cal-scope { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 4px; margin-left: 4px; }
.cal-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@media (max-width: 640px) {
  .cal-day { grid-template-columns: 1fr; gap: 6px; }
  .cal-date { flex-direction: row; gap: 8px; align-items: baseline; }
  .cal-date b { font-size: 18px; }
  .cal-ev { grid-template-columns: 84px minmax(0, 1fr); }
  .cal-amount { grid-column: 2; text-align: left; }
  .cal-ics { margin-left: 0; }
}

/* ---------- Карточка эмитента ---------- */
.is-head h1 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.02em; }
.is-ids { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; color: var(--muted); }
.is-ids b { color: var(--text); font-weight: 600; }
.st-grid.is-tiles { margin: 0 0 16px; }
.is-admin { margin-top: 16px; }
.is-admin summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-2); }
.is-admin .pfs-grid { margin-top: 8px; }

/* ---------- Рейтинги на карточке эмитента ---------- */
.is-comp { font-size: 14px; }
.is-comp b { font-size: 18px; margin: 0 4px; }
.is-alert { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--bad); background: var(--err-bg); color: var(--err-fg); font-size: 13px; border-radius: 4px; }

/* ---------- Радар риска ---------- */
.st-grid.rd-tiles { margin: 0 0 16px; }
.rd-t3 .v { color: var(--bad); }
.rd-t2 .v { color: var(--warn-fg); }
.rd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.rd-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rd-item:last-child { border-bottom: none; }
.rd-item a { color: var(--text); }
.rd-level { font-size: 11px; font-weight: 600; text-align: center; padding: 3px 0; border-radius: 4px; border: 1px solid; align-self: start; }
.rd-item.l3 .rd-level { color: var(--bad); border-color: var(--bad-line); background: var(--err-bg); }
.rd-item.l2 .rd-level { color: var(--warn-fg); border-color: var(--warn-line); background: var(--warn-bg); }
.rd-item.l1 .rd-level { color: var(--muted); border-color: var(--line-strong); background: var(--panel-2); }
.rd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .rd-grid { grid-template-columns: 1fr; } }
.rd-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.rd-stack { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--panel-2); }
.rd-stack span { display: block; height: 100%; }
.rd-stack span + span { border-left: 2px solid var(--panel); }
.rd-legend, .rd-bars { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.rd-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.rd-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.rd-legend b, .rd-bars b { font-variant-numeric: tabular-nums; text-align: right; }
.rd-legend span { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
.rd-bars { margin-top: 0; }
.rd-bars li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 56px; gap: 10px; align-items: center; }
.rd-bars li > span:first-child { overflow-wrap: anywhere; line-height: 1.3; }
.rd-bars a { color: var(--text); }
.rd-bar { height: 8px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.rd-bar i { display: block; height: 100%; background: var(--accent-2); }
.rd-bar i.risky { background: var(--bad); }
.rd-bar i.none { background: var(--line-strong); }
.rd-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; font-size: 13px; }
.rd-rules ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
@media (max-width: 900px) { .rd-rules { grid-template-columns: 1fr; } .rd-item { grid-template-columns: 1fr; gap: 6px; } .rd-level { justify-self: start; padding: 3px 10px; } }
.login-ver { text-align: center; color: var(--muted); font-size: 11px; margin: 14px 0 0; }

/* ==================== 1.7.0: карточка акции — показатели, прогнозы, инсайдеры, торговые условия ==================== */
.fx-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 28px; }
.fx-g { min-width: 0; }
.fx-g h3 { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fx-g dl { margin: 0; }
.fx-r { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.fx-r:last-child { border-bottom: 0; }
.fx-r dt { min-width: 0; font-size: 13px; }
.fx-r dt span { display: block; font-size: 11px; color: var(--muted); line-height: 1.35; }
.fx-r dd { margin: 0; font-weight: 600; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-r dd.good { color: var(--good); } .fx-r dd.bad { color: var(--bad); }

.st-tile .s.good { color: var(--good); } .st-tile .s.bad { color: var(--bad); }
.st-tile .v.good { color: var(--good); } .st-tile .v.bad { color: var(--bad); }
.fc-split { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 6px 0 2px; background: var(--line); gap: 2px; }
.fc-split i { display: block; }
.fc-split .b { background: var(--brand); } .fc-split .h { background: var(--brand-steel); } .fc-split .s { background: var(--bad); }
.rec { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; border: 1px solid var(--line-strong); }
.rec-buy { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.rec-sell { color: var(--bad); border-color: var(--bad-line); background: var(--err-bg); }
.rec-hold { color: var(--muted); background: var(--panel-2); }

.rng { position: relative; height: 22px; margin: 14px 6px 4px; }
.rng::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line); border-radius: 1px; }
.rng-band { position: absolute; top: 8px; height: 6px; background: var(--good-line); border-radius: 3px; }
.rng-dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
.rng-dot.now { background: var(--brand-ink); }
.rng-dot.tgt { background: var(--brand); }
.rng-legend .lg { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 2px; vertical-align: -1px; }
.rng-legend .lg.now { background: var(--brand-ink); } .rng-legend .lg.tgt { background: var(--brand); }
.rng52 { margin-bottom: 14px; }
.rng52-lbl { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.rng52-lbl b { color: var(--text); font-weight: 600; }

.ins-table td { vertical-align: middle; }
.ins-who { white-space: normal !important; min-width: 180px; }
.ins-who span { display: block; font-size: 12px; color: var(--muted); }
.cardx-table td.good { color: var(--good); } .cardx-table td.bad { color: var(--bad); }
.cal-badge.t-report { color: var(--brand-ink); border-color: var(--line-strong); background: var(--brand-mist); }
.pub-src td { white-space: normal !important; vertical-align: top; font-size: 13px; }
.pub-src td:first-child { white-space: nowrap !important; }
label.chk { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px; font-size: 13px; color: var(--text); }
label.chk input { width: auto; }
#public form.inline-form button { margin-top: 0; }

/* ==================== 1.7.1: справочник выпусков — проверка данных ==================== */
.iss-table td { vertical-align: middle; }
.iss-table .iss-name { white-space: normal !important; min-width: 160px; }
.iss-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.iss-stc { white-space: normal !important; min-width: 190px; max-width: 280px; }
.iss-st { display: inline-block; white-space: normal; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; line-height: 1.4; border: 1px solid var(--line-strong); color: var(--muted); background: var(--panel-2); }
.iss-st.iss-ok { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.iss-st.iss-warn { color: var(--warn-fg); border-color: var(--warn-line); background: var(--warn-bg); }
.iss-st.iss-bad { color: var(--bad); border-color: var(--bad-line); background: var(--err-bg); }
.iss-act { white-space: nowrap; margin-top: 2px; }
.iss-act form { display: inline; margin: 0; }
button.linkbtn { margin: 0 10px 0 0; padding: 0; background: none; border: 0; color: var(--accent-2); font-size: 12px; font-weight: 500; text-decoration: underline; cursor: pointer; }
button.linkbtn:hover { background: none; color: var(--text); }
button.linkbtn.bad { color: var(--bad); }
#issues .st-bar form { margin: 0; }

/* ==================== 1.8.0: дизайн-система — шапка, чёрная полоса навигации, тёмная тема ==================== */
/* Меню разделов живёт в чёрной полосе под шапкой: группы «Мой портфель», «Рынок», «Сервис». */
.dark-strip {
  background: var(--brand-night);
  color: #ffffff;
  padding: 6px 28px 10px;
  position: relative;   /* 1.48.1: не прилипает к верху экрана; relative нужен, чтобы выпадающие панели лежали поверх страницы */
  z-index: 20;
}
.dark-strip nav.menu { display: flex; flex-wrap: wrap; gap: 6px 0; align-items: flex-end; }
.dark-strip .grp {
  display: flex; flex-direction: column;
  padding-right: 14px; margin-right: 14px;
  border-right: 1px solid #2c3746;
}
.dark-strip .grp:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.dark-strip .grp > small {
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #8A94A3; margin-top: 4px;
}
.dark-strip .grp-items { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.dark-strip .grp-items a,
.dark-strip .grp-items button.linklike {
  color: #C5CCD6; font-size: 13px; font-weight: 500; text-decoration: none;
  padding: 6px 0 8px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.dark-strip .grp-items a:hover,
.dark-strip .grp-items button.linklike:hover { color: #ffffff; border-bottom-color: var(--brand); }
.dark-strip .grp-items a.on { color: #ffffff; border-bottom-color: var(--brand); }
.dark-strip .soon { color: #4b5666; font-size: 13px; padding: 6px 0 8px; white-space: nowrap; cursor: default; }
.dark-strip .logout-form { display: inline; margin: 0; }

/* Шапка: логотип и версия; тёмная версия логотипа включается темой (токены --logo-*) */
header { padding: 0 28px; }
header .brandrow { padding-top: 10px; padding-bottom: 8px; }
header .brand { padding-top: 0; }

@media (max-width: 760px) {
  .dark-strip { padding: 6px 16px 10px; }
  .dark-strip nav.menu { gap: 8px 0; }
  .dark-strip .grp { border-right: 0; margin-right: 0; padding-right: 0; }
  .dark-strip .grp-items { gap: 0 14px; }
}
@media (max-width: 640px) {
  header { padding: 0 16px; }
  .dark-strip { padding: 6px 16px 10px; }
}

/* Переключатель темы в шапке, рядом с версией */
.hdr-right { display: inline-flex; align-items: center; gap: 12px; }
button.hdr-theme {
  margin: 0; padding: 3px 10px; font-size: 12px; font-weight: 500; line-height: 1.5;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
}
button.hdr-theme:hover { color: var(--text); background: var(--panel-2); border-color: var(--muted); }

/* ==================== 1.9.0: ночной импорт — уведомление при входе и страница событий ==================== */
.ev-banner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px;
  margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 6px; background: var(--panel);
}
.ev-text { flex: 1 1 360px; min-width: 0; font-size: 13.5px; }
.ev-top { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.ev-actions { display: flex; align-items: center; gap: 12px; }
.ev-actions a { font-size: 13px; font-weight: 600; color: var(--accent); }
.ev-actions form { margin: 0; }
.ev-actions button.ghost { margin: 0; padding: 6px 12px; font-size: 12px; }
.ev-count {
  display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--on-ink); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.ev-head .ev-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ev-head h1 { margin: 0 0 4px; font-size: 24px; }
.ev-head p { margin: 0; max-width: 70ch; font-size: 13px; }
.ev-daynav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ev-daynav a.ghost { padding: 6px 12px; font-size: 13px; }
.ev-tiles { margin-bottom: 16px; }
.ev-badge { display: inline-block; padding: 2px 8px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ev-badge.income { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.ev-badge.risk { color: var(--warn-fg); border-color: var(--warn-line); background: var(--warn-bg); }
.ev-badge.info { color: var(--muted); border-color: var(--line-strong); background: var(--panel-2); }
.ev-own {
  display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-ink);
}
.ev-table td { vertical-align: middle; }
.ev-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) {
  .ev-head h1 { font-size: 20px; }
  .ev-actions { width: 100%; justify-content: space-between; }
}

/* ==================== 1.9.2: группы новых выпусков и ссылки на документы ==================== */
.ev-group { margin: 0 0 10px; }
.ev-group summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); padding: 6px 0; }
.ev-group[open] summary { margin-bottom: 6px; }
.ev-tiles .s a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#new, #gone, #divs, #other { scroll-margin-top: 16px; }

/* ==================== 1.10.0: описание сайта на экране входа (без личных данных) ==================== */
.guest { max-width: 760px; margin: 28px auto 0; }
.guest-h { font-size: 18px; margin: 0 0 12px; text-align: center; }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.guest-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); min-width: 0; }
.guest-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.guest-card p { margin: 0; font-size: 13px; color: var(--muted); }
.guest-note { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--panel-2); border-radius: 6px; font-size: 13px; color: var(--muted); }
.guest-note p { margin: 0 0 6px; }
.guest-note p:last-child { margin-bottom: 0; }
.guest-note a { color: var(--accent); font-weight: 600; }

/* ==================== 1.11.0: регистрация, вход, личный кабинет ==================== */
.auth-wrap { max-width: 440px; margin: 24px auto 0; }
.auth-ok { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--good-line); background: var(--good-bg); color: var(--good); border-radius: 6px; font-size: 14px; }
.auth-hint { margin: 6px 0 10px; font-size: 12.5px; color: var(--muted); }
.auth-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.auth-links a { color: var(--accent); font-weight: 600; }
.auth-form { margin-bottom: 18px; }
.auth-form h3, .card h3 { margin: 18px 0 6px; font-size: 15px; }
.auth-form label.check { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; color: var(--text); }
.auth-form label.check input { width: auto; margin: 0; }
.auth-form select { width: 100%; }

/* 1.11.2: переключатель портфеля над разделами «Портфель» */
.pf-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.pf-chip { padding: 4px 12px; border: 1px solid var(--accent-2); border-radius: 999px; color: inherit; text-decoration: none; }
.pf-chip.on { background: var(--sel); color: var(--bg); border-color: var(--sel); }

/* 1.11.4: кнопка «+» и меню портфеля, календарь */
.pf-add { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px;
  border-radius: 50%; background: var(--brand); color: #ffffff; text-decoration: none;
  font-size: 20px; font-weight: 500; line-height: 1; box-shadow: 0 2px 6px rgba(30, 143, 94, .28);
  transition: background .15s, transform .15s; }
.pf-add:hover { background: var(--brand-ink); color: #ffffff; transform: scale(1.06); }
.pf-add:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pf-menu { position: absolute; z-index: 60; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: 4px; }
.pf-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; border-radius: 6px; }
.pf-menu button:hover { background: var(--brand-tint); }
.cal-econ { margin: 0 0 14px; font-size: 14px; }

/* 1.11.8–1.11.10: резервная копия и удаление портфеля */
.pf-actions { margin: 4px 0 8px; font-size: 14px; }
.pf-actions a { color: var(--brand); text-decoration: underline; }
.pf-subrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pf-subrow > .subtabs { flex: 1 1 auto; min-width: 0; }
.pf-del-open { margin: 0; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 600; color: var(--panel); background: var(--bad); border: 1px solid var(--bad); border-radius: 4px; cursor: pointer; }
.pf-del-open:hover { filter: brightness(.92); }
.pf-dialog { width: min(460px, calc(100vw - 32px)); max-width: 100%; margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--text); box-shadow: 0 12px 36px rgba(0, 0, 0, .28); }
.pf-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.pf-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.pf-dialog-head h3 { margin: 0; font-size: 17px; }
.pf-dialog-x { margin: 0; padding: 0 6px; font-size: 22px; line-height: 1; color: var(--muted); }
.pf-dialog-body { padding: 14px 20px 20px; }
.pf-dialog-body .ghost-link { display: inline-block; margin: 4px 0 10px; }
.pf-dialog-body .auth-form { margin-top: 6px; }
.pf-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pf-dialog-actions button { margin-top: 0; }
.pf-del-btn { margin-top: 0; color: var(--panel); background: var(--bad); border: 1px solid var(--bad); border-radius: 4px; padding: 10px 20px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pf-del-btn:hover { filter: brightness(.92); background: var(--bad); border-color: var(--bad); }

.pf-del-open.pf-del-sm { padding: 4px 10px; font-size: 12px; }

/* 1.11.12: настройки портфеля (шестерёнка, описание, архив) */
.pf-gear { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0; padding: 0; background: var(--panel); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer; }
.pf-gear:hover { color: var(--text); background: var(--panel-2); border-color: var(--muted); }
.pf-desc { margin: 2px 0 10px; font-size: 13px; }
.pf-dialog .auth-form label.check { margin: 6px 0 0; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; color: var(--text); }

/* 1.11.13: вкладка «Сделки» (облигации и акции), добавление счёта на странице «Портфель» */
.pf-addacc { margin-top: 12px; }
.pf-addacc > summary { cursor: pointer; color: var(--accent-2); font-size: 13px; }
.pf-kinds { margin-top: 8px; }

/* 1.11.18: таблица «По выпускам» — компактнее и со скроллом внутри карточки на узком экране */
.hold-wrap { width: 100%; overflow-x: auto; }
.hold-table { width: auto; min-width: 100%; }
.hold-table th, .hold-table td { padding: 8px 6px; }
.hold-table th { white-space: normal; line-height: 1.3; }
.hold-table td.num { font-variant-numeric: tabular-nums; }

/* 1.11.19: код бумаги (ISIN или тикер) под названием в таблицах */
.sec-code { font-size: 12px; }

/* 1.11.26: подвал со строкой версий (сайт, схема БД, база) */
.app-foot { font-size: 11px; color: var(--muted); text-align: center; padding: 24px 16px 12px; }

/* Меню в шапке: разделы выпадают списком (версия 1.11.34) */
.dark-strip nav.menu { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dark-strip details.dd { position: relative; }
.dark-strip details.dd > summary {
  list-style: none; cursor: pointer; color: #C5CCD6; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-bottom: 2px solid transparent; white-space: nowrap; user-select: none;
}
.dark-strip details.dd > summary::-webkit-details-marker { display: none; }
.dark-strip details.dd > summary::after { content: "\25BE"; margin-left: 6px; font-size: 11px; color: #8A94A3; }
.dark-strip details.dd > summary:hover,
.dark-strip details.dd[open] > summary { color: #ffffff; }
.dark-strip details.dd.dd-on > summary { color: #ffffff; border-bottom-color: var(--brand); }
.dd-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 220px; max-width: calc(100vw - 32px);
  background: #1d2633; border: 1px solid #2c3746; border-radius: 8px; padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 2px;
}
.dd-panel a,
.dd-panel .soon,
.dd-panel button.linklike {
  display: block; width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 6px;
  color: #C5CCD6; font: inherit; font-size: 14px; text-align: left; text-decoration: none; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
}
.dd-panel a:hover,
.dd-panel button.linklike:hover { background: #2c3746; color: #ffffff; }
.dd-panel a.on { background: #2c3746; color: #ffffff; }
.dd-panel .soon { color: #4b5666; cursor: default; }
.dd-panel .logout-form { margin: 0; }

/* Сравнение портфелей (версия 1.11.35) */
.cmp-table { min-width: 620px; font-variant-numeric: tabular-nums; }
.cmp-table th, .cmp-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
.cmp-table thead th { font-weight: 600; }
.cmp-table tbody th { text-align: left; font-weight: 500; color: var(--muted); }

/* Режим просмотра аккаунта (версия 1.11.36) */
.act-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: #FFF3C4; color: #4A3500; border: 1px solid #E0B44C; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }
/* Таблица пользователей */
.usr-table { min-width: 860px; font-size: 13px; }
.usr-table th, .usr-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }

/* Режим пользователя администратора (версия 1.11.38) */
.role-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: #DDEBFA; color: #123A66; border: 1px solid #7DA8D9; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

/* ===== Заметки (1.11.42): карточки, цвета в обеих темах, метки, чек-листы ===== */
:root {
  --nt-coral: #FBE3D8; --nt-sand: #F4EBD3; --nt-mint: #DDF1E6;
  --nt-sky: #DCEBF7; --nt-lavender: #E8E1F7; --nt-rose: #F7DEE7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nt-coral: #5A3A32; --nt-sand: #4F4630; --nt-mint: #2E4A3C;
    --nt-sky: #2F4357; --nt-lavender: #3E3556; --nt-rose: #55364A;
  }
}
:root[data-theme="dark"] {
  --nt-coral: #5A3A32; --nt-sand: #4F4630; --nt-mint: #2E4A3C;
  --nt-sky: #2F4357; --nt-lavender: #3E3556; --nt-rose: #55364A;
}
.nt-c-default { --nt-bg: var(--panel); }
.nt-c-coral { --nt-bg: var(--nt-coral); }
.nt-c-sand { --nt-bg: var(--nt-sand); }
.nt-c-mint { --nt-bg: var(--nt-mint); }
.nt-c-sky { --nt-bg: var(--nt-sky); }
.nt-c-lavender { --nt-bg: var(--nt-lavender); }
.nt-c-rose { --nt-bg: var(--nt-rose); }

.nt { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding-block: 12px; align-items: start; }
@media (max-width: 760px) { .nt { grid-template-columns: minmax(0, 1fr); } }
.nt-side nav { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 760px) { .nt-side nav { flex-direction: row; flex-wrap: wrap; } }
.nt-nav { display: block; flex: 1; padding: 7px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.nt-nav:hover { background: var(--panel-2); }
.nt-nav.on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
.nt-lab { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nt .linklike { background: none; border: none; color: var(--muted); font-size: 16px; padding: 0 6px; cursor: pointer; }
.nt-labels-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 12px 12px 4px; }
.nt-main { min-width: 0; }
.nt button { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-ink); cursor: pointer; }
.nt button.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.nt input[type="text"], .nt input:not([type]), .nt input[type="search"], .nt textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--panel); color: var(--text); box-sizing: border-box; }
.nt textarea { resize: vertical; }
.nt-search { display: flex; gap: 8px; margin-bottom: 12px; }
.nt-search input { flex: 1; }
.nt-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.nt-row label { font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.nt-composer, .nt-form { display: flex; flex-direction: column; gap: 8px; }
.nt-composer { background: var(--nt-bg, var(--panel)); transition: background-color .15s; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.nt-colors { display: inline-flex; gap: 6px; }
.nt-swatch { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--nt-bg, var(--panel)); display: inline-block; }
.nt-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.nt-swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand-ink); }
.nt-empty { color: var(--muted); margin: 18px 0; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.nt-card { background: var(--nt-bg, var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.nt-card h3 { margin: 0; font-size: 16px; text-wrap: balance; overflow-wrap: anywhere; }
.nt-body { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.nt-open { cursor: pointer; }
.nt-badge { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.nt-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nt-item { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; min-width: 0; }
.nt-item input[type="checkbox"] { margin-top: 3px; flex: none; }
.nt-item span { overflow-wrap: anywhere; }
.nt-item .done { text-decoration: line-through; color: var(--muted); }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); text-decoration: none; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.nt-actions form { margin: 0; }
.nt-actions button { font-size: 12px; padding: 4px 8px; }
.nt-dlg { border: 1px solid var(--line); border-radius: 14px; padding: 16px; width: min(92vw, 520px); background: var(--nt-bg, var(--panel)); transition: background-color .15s; color: var(--text); }
.nt-dlg::backdrop { background: rgba(0,0,0,.4); }
.nt-dlg .nt-form { gap: 10px; }

/* ===== Заметки (1.11.43): порядок, сворачивание, напоминания, переименование меток ===== */
.nt-sec { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 8px; }
.nt-flash { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.nt-remind { font-size: 12px; color: var(--muted); }
.nt .nt-more { background: none; border: none; color: var(--good); padding: 0; font-size: 13px; cursor: pointer; text-align: left; }
.nt-card:not(.nt-expanded) .nt-clamp { max-height: 9em; overflow: hidden; }
.nt-card[draggable="true"] { cursor: grab; }
.nt-card.nt-dragging { opacity: .5; }
.nt-cnt { color: var(--muted); font-size: 12px; margin-left: 6px; }
.nt-lab { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px; }
.nt-lab > form { margin: 0; grid-column: 2; grid-row: 1; }
.nt-lab > .nt-nav { grid-column: 1; grid-row: 1; }
.nt-ren { grid-column: 1 / -1; font-size: 13px; padding: 0 12px 6px; }
.nt-ren summary { cursor: pointer; color: var(--muted); }
.nt-ren-form { display: flex; gap: 6px; margin-top: 6px; }
.nt-ren-form input { flex: 1; min-width: 0; }
.nt input[type="datetime-local"] { width: auto; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); color: var(--text); }
.nt-remind-in { font-size: 14px; display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ===== Кнопка «В заметки» на карточках бумаг и ссылки в заметках (1.11.45) ===== */
.add-notes-form { margin: 0; display: inline-flex; }
.st-head .add-notes-form { margin: 8px 0 4px; }
.add-to-notes { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; }
.add-to-notes:hover { background: var(--panel-2); }
button.cardx-btn { margin: 0; font: 600 13px/1.2 var(--font); cursor: pointer; }
/* Строка кнопок занимает всю ширину: блок с кодом и биржей уходит вправо */
.cardx-head > .cardx-ids { flex: 1 1 100%; justify-content: space-between; }
.cardx-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.nt-body a { color: var(--good); overflow-wrap: anywhere; }

/* ===== Поиск заметок: кнопка «Найти» внутри поля, справа (1.11.49) ===== */
.nt-search { position: relative; display: block; margin-bottom: 12px; }
.nt-search input[type="search"] { width: 100%; padding-right: 92px; }
.nt-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.nt .nt-search button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin: 0; padding: 6px 14px; }

/* ===== Корзина заметок: пояснение о сроке хранения (1.11.51) ===== */
.nt-trash-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

/* ===== Переименование метки правым кликом (1.11.52) ===== */
.nt-rename { border: 1px solid var(--line); border-radius: 14px; padding: 16px; width: min(92vw, 420px); background: var(--panel); color: var(--text); }
.nt-rename::backdrop { background: rgba(0,0,0,.4); }
.nt-rename .nt-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Описание счёта: поле такой же ширины и оформления, как остальные поля; кнопка под ним. */
form textarea.acc-desc { display: block; width: 100%; box-sizing: border-box; min-height: 56px; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--panel); color: var(--text); resize: vertical; }
form textarea.acc-desc + button { display: block; margin-top: 10px; }

/* Покупка: стоимость можно поправить вручную (маркер рядом со словом «Стоимость») */
.cost-inp { font-size: 18px; font-weight: 600; margin-top: 2px; width: 100%; box-sizing: border-box; }
.edit-mark { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; border: 1px dashed var(--accent); color: var(--accent); font-size: 11px; white-space: nowrap; }

/* Счета (вкладка «Счета»): общий вид списка и кнопок в корпоративном стиле */
.acc-list { display: flex; flex-direction: column; }
.acc-item { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 0; padding-bottom: 0; }
.acc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.acc-name { font-size: 15px; font-weight: 600; color: var(--text); }
.acc-tag { font-size: 12px; line-height: 1.4; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); white-space: nowrap; }
.acc-meta { font-size: 13px; color: var(--muted); }
.acc-text { margin: 0; font-size: 14px; color: var(--text); }
.acc-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; margin-top: 6px; }
.acc-actions details { margin: 0; }
.acc-actions summary { padding: 0; font-size: 13px; }
.acc-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-width: 480px; }
.acc-form button { margin: 0; align-self: flex-start; }
.acc-form input[type="date"] { max-width: 220px; }

/* Карточка акции: кнопки «Добавить в портфель» и «В заметки» в одну строку, как у облигаций */
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 6px; }
.st-actions .add-notes-form { margin: 0; }

/* 1.13.7: категории облигаций — пункты меню «Рынок» и ряд вкладок на скринере и «Рынке» */
.dd-panel a.sub { padding-left: 26px; font-size: 0.92em; }
.dd-panel a.sub.on { font-weight: 600; }
.cat-tabs { margin-top: -4px; }
.mk-cats { align-items: center; }
.mk-cats-lab { font-size: 13px; margin-right: 2px; }

/* 1.14.0: признаки облигаций (квал, субординированная, бессрочная) */
.scr .flagq { color: var(--muted); font-size: 11px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }

/* Результат портфеля (1.15.0) */
.pf-wf { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pf-row { display: grid; grid-template-columns: minmax(110px, 170px) 1fr minmax(120px, 160px); gap: 12px; align-items: center; }
.pf-row.total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.pf-name { color: var(--text); }
.pf-bar { height: 12px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.pf-bar span { display: block; height: 100%; border-radius: 6px; }
.pf-bar span.pos { background: var(--brand); }
.pf-bar span.neg { background: var(--bad); }
.pf-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-val.bad, .num.bad, .kpi.bad { color: var(--bad); }
.pf-hints { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.pf-cmp tr.me td { font-weight: 600; background: var(--panel-2); }
.pf-dep { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.pf-dep input, .pf-dep select { width: 110px; min-width: 70px; height: 40px; box-sizing: border-box; margin: 0; }
.pf-dep input[type=month] { width: 150px; }
.pf-dep label { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.pf-dep button { height: 40px; margin: 0; }
@media (max-width: 640px) { .pf-row { grid-template-columns: 1fr; gap: 4px; } .pf-val { text-align: left; } }
.pf-wf, .card .tbl-wrap { max-width: 100%; }
.card .tbl-wrap { overflow-x: auto; }

/* Денежный поток (1.16.0) */
.cf-scroll { overflow-x: auto; max-width: 100%; }
.cf-chart { display: flex; gap: 3px; align-items: flex-end; height: 200px; min-width: calc(var(--n) * 22px); padding-top: 6px; }
.cf-col { flex: 1 1 0; min-width: 18px; display: flex; flex-direction: column; align-items: stretch; height: 100%; }
.cf-stack { flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-bottom: 1px solid var(--line-strong); }
.cf-stack span { display: block; width: 100%; }
.cf-stack .c { background: var(--brand); }
.cf-stack .p { background: var(--brand-steel); }
.cf-col.hole { outline: 1px dashed var(--bad); outline-offset: 1px; background: var(--bad-bg); }
.cf-m { font-size: 10px; text-align: center; color: var(--muted); line-height: 1.2; padding-top: 3px; min-height: 26px; }
.cf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 13px; }
.cf-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.cf-legend .c { background: var(--brand); } .cf-legend .p { background: var(--brand-steel); }
.cf-legend .h { background: var(--bad-bg); outline: 1px dashed var(--bad); }
tr.cf-hole td { background: var(--bad-bg); }
.btn-sm { display: inline-block; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13px; text-decoration: none; color: var(--text); background: var(--panel); }
.btn-sm:hover { background: var(--brand-tint); }
.cf-fill { margin: -4px 0 4px 0; }
.hole-banner { border-left: 4px solid var(--brand); }
.btn-link { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; text-decoration: none; }
.cf-up { color: var(--brand-steel); font-size: 9px; }
.cf-stack { overflow: hidden; }

/* ==================== 1.21: контекстная справка «?», окно подсказки, FAQ ==================== */
.qa { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-grid; place-items: center;
  font: 700 11px/1 var(--font, inherit); color: var(--muted); text-decoration: none; flex: 0 0 auto; vertical-align: middle; margin-left: 8px; background: transparent; }
.qa:hover, .qa:focus-visible { color: var(--accent); border-color: var(--accent); }
.st-bar .qa, .faq-head .qa { margin-right: auto; }
.pop { position: fixed; z-index: 1000; width: min(420px, 100vw - 24px); max-height: min(60vh, 520px); display: flex; flex-direction: column;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .28); left: 12px; top: 12px; }
.pop[hidden] { display: none; }
.poph { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.poph b { font-size: 14px; }
.pop-x { font: inherit; font-size: 16px; line-height: 1; width: 28px; height: 28px; padding: 0; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); cursor: pointer; }
.pop-x:hover { background: var(--panel-2); }
.popb { overflow: auto; padding: 10px 12px; font-size: 13px; line-height: 1.55; }
.popb p { margin: 0 0 8px; }
.popb ul, .popb ol { margin: 0 0 8px; padding-left: 18px; }
.popb dl { margin: 0; } .popb dt { font-weight: 600; margin-top: 6px; } .popb dd { margin: 0 0 4px; }
.popf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; }
.popf a { font-weight: 600; }
.faq-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.faq-head h2 { margin: 0; margin-right: auto; }
.faqq { min-width: 0; width: min(320px, 100%); background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; font: inherit; color: var(--text); }
.faq-cols { display: block; margin-top: 8px; }
@media (min-width: 1000px) { .faq-cols { column-count: 2; column-gap: 32px; } .faq-cols details.q { break-inside: avoid; } }
details.q { border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
details.q summary { cursor: pointer; list-style: none; padding: 12px 0; font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: baseline; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::before { content: "+"; font-weight: 700; font-size: 14px; color: var(--accent); width: 12px; flex: 0 0 auto; }
details.q[open] summary::before { content: "−"; }
details.q.flash, details.q.hit { background: var(--brand-tint, var(--panel-2)); }
details.q.flash summary, details.q.hit summary { color: var(--accent); }
.qb { padding: 0 0 14px 22px; font-size: 13px; line-height: 1.6; max-width: 74ch; }
.qb p { margin: 0 0 8px; } .qb ul { margin: 0 0 8px; padding-left: 18px; } .qb li { margin-bottom: 4px; }
.qb dl { margin: 0; } .qb dt { font-weight: 600; margin-top: 8px; } .qb dd { margin: 0 0 4px; }
@media (prefers-reduced-motion: no-preference) { details.q { transition: background .4s; } }

/* 1.21.1: правки по итогам проверки сайта */
.card h2, .card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 700px) {
  .dark-strip details.dd { position: static; }
  .dd-panel { left: 16px; right: 16px; min-width: 0; max-width: none; }
  .subtabs.section-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .subtabs.section-nav > * { flex: 0 0 auto; white-space: nowrap; }
  .qa { width: 28px; height: 28px; }
}

/* 1.21.5: заголовки групп в таблице «Статистика» */
.stat-table tr.stat-grp th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); padding: 10px 12px; border-top: 1px solid var(--line); }

/* 1.22.0: деньги на счетах */
.cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.cash-grid .card { margin-bottom: 0; }
.cash-dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 10px 0; }
.cash-dl dt { color: var(--muted); } .cash-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cash-dl dd.bad { color: var(--bad); } .cash-dl dd.good { color: var(--good, var(--brand)); }
.cash-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cash-acts details > summary { cursor: pointer; font-weight: 500; padding: 6px 0; }
.cash-inl { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin: 0; }
.cash-inl input { width: 110px; text-align: right; margin: 0; height: 36px; box-sizing: border-box; }
.cash-inl button { margin: 0; height: 36px; }
.acc-tag.bad { color: var(--bad); border-color: var(--bad); }

/* Краткая статистика на странице «Портфель» */
.ks-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ks-head h2 { margin: 0; }
.ks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; }
.ks-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.ks-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ks-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ks-k { font-size: 13px; color: var(--muted); }
.ks-v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 560px) { .ks-grid { grid-template-columns: 1fr; } }
.ks-tip { position: relative; display: inline-block; cursor: help; border-bottom: 1px dotted var(--muted); outline: none; }
.ks-pop { display: none; position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); width: 340px; max-width: 80vw; max-height: 320px; overflow-y: auto; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 12px; font-weight: 400; line-height: 1.45; color: var(--text); }
.ks-tip:hover .ks-pop, .ks-tip:focus .ks-pop, .ks-tip:focus-within .ks-pop { display: block; }
.ks-mon { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-weight: 600; }
.ks-pap { color: var(--muted); padding-left: 2px; }
.ks-period .ks-k { display: flex; align-items: center; gap: 8px; }
.ks-period a.ks-v { text-decoration: none; }
.ks-period a.ks-v:hover { text-decoration: underline; }
.ks-arr { width: 22px; height: 22px; padding: 0; margin: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-size: 14px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ks-arr:hover { border-color: var(--brand); color: var(--brand); }

/* Новости */
.news-list { display: flex; flex-direction: column; }
.news-item { display: flex; flex-direction: column; gap: 6px; padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.news-item:last-child { border-bottom: 0; }
.news-item.lv3 { border-left-color: #c0392b; }
.news-item.lv2 { border-left-color: #d98a00; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.news-title { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.news-title:hover { text-decoration: underline; }
.news-text { margin: 0; font-size: 13px; color: var(--muted); }
.news-lv { background: var(--brand-mist); color: var(--muted); }
.news-lv.bad { background: #fbe9e7; color: #a5281b; }
.news-lv.warn { background: #fff3dc; color: #8a5a00; }
.news-mine { background: var(--brand-tint); color: var(--brand); }

/* Новости: настройка ленты */
.news-prefs { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.news-prefs summary { cursor: pointer; font-weight: 600; }
.news-prefs form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; align-items: flex-start; }
.news-pref-group { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; max-width: 100%; }
.news-pref-group legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.news-pref { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

/* Новости: страница записи */
.news-page h2 { margin: 8px 0 12px; }
.news-full { max-width: 70ch; line-height: 1.55; }
.news-src { font-size: 12px; margin-left: 8px; }
.news-bonds td, .news-bonds th { white-space: nowrap; }
.news-bonds td:first-child { white-space: normal; min-width: 14em; }

.news-more { margin: 6px 0 0; font-size: 13px; }
.news-more summary { cursor: pointer; color: var(--muted); }
.news-more ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.news-note { display: inline; margin-left: 8px; }
.news-note-btn { font: inherit; font-size: 12px; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.news-note-btn:hover { color: var(--accent); }
.news-actions { margin: 8px 0; }

.news-sites td { vertical-align: top; }
.news-site-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-site-form input[type=url] { flex: 1 1 18em; min-width: 12em; }

/* Поля внутри цветного окна и формы остаются читаемыми на любом фоне */
.nt-dlg input:not([type=radio]):not([type=checkbox]), .nt-dlg textarea, .nt-composer input:not([type=radio]):not([type=checkbox]), .nt-composer textarea { background: color-mix(in srgb, var(--panel) 72%, transparent); }

.news-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.news-foot .add-notes-form { margin: 0; }
.news-foot .news-src { margin: 0; }

.news-sug { margin: 6px 0 0; font-size: 12px; }

.news-sites .news-sites-sep td { background: var(--bg-soft, rgba(127,127,127,.08)); padding-top: 12px; }

.held-tag { background: var(--brand-tint); color: var(--brand); font-size: 10px; padding: 1px 7px; margin-left: 6px; }

/* Меню: одиночные пункты верхней полосы и правое меню «Личные данные» (1.31.0) */
.dark-strip nav.menu > a.top-link {
  color: #C5CCD6; font-size: 14px; font-weight: 500; padding: 8px 12px; border-bottom: 2px solid transparent;
  white-space: nowrap; text-decoration: none;
}
.dark-strip nav.menu > a.top-link:hover { color: #ffffff; }
.dark-strip nav.menu > a.top-link.top-on { color: #ffffff; border-bottom-color: var(--brand); }
/* main.has-side: ширина общая */
.side-wrap { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 20px; align-items: start; }
.side-main { min-width: 0; }
.side-nav { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 12px; }
.side-nav h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.side-nav nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: block; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: var(--panel-2); }
.side-nav a.on { background: var(--good-bg); color: var(--ok-fg); }
@media (max-width: 900px) {
  .side-wrap { grid-template-columns: minmax(0, 1fr); }
  .side-nav { position: static; padding: 10px 12px; }
  .side-nav nav { flex-direction: row; flex-wrap: wrap; }
}
.home-news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.home-news li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.home-news li:last-child { border-bottom: 0; padding-bottom: 0; }
.home-news a { font-weight: 500; }
.hn-meta { font-size: 12px; margin-top: 2px; }

/* Кривая доходности, структура портфеля, шкала прибыли акций (1.32.0) */
.pf-viz { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.pf-viz > .card { margin: 0; }
@media (max-width: 900px) { .pf-viz { grid-template-columns: minmax(0, 1fr); } }
.pf-curve-sw { display: inline-flex; gap: 6px; }
.pf-curve-box { position: relative; min-height: 180px; }
.pf-struct-row { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pf-donut { position: relative; width: 220px; height: 220px; }
.pf-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.pf-donut-c b { font-size: 16px; }
.pf-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.pf-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pf-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pf-lg-n { flex: 1; min-width: 0; }
.pf-lg-v { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.pnl-scale { position: relative; display: inline-block; width: 110px; height: 10px; background: var(--panel-2); border-radius: 5px; vertical-align: middle; }
.pnl-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.pnl-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.pnl-bar.good { background: var(--good); }
.pnl-bar.bad { background: var(--bad); }
.st-tv { position: relative; height: 560px; width: 100%; margin-top: 12px; }
@media (max-width: 600px) { .st-tv { height: 440px; } }

.subtab-add { display: inline-flex; align-items: center; gap: 7px; }
.tab-plus { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.subtab-add:hover .tab-plus { transform: rotate(90deg); }

/* Переключатель «Облигации / Акции» на странице «Добавить в портфель»: крупный, в рамке-подложке */
.subtabs.pf-kinds { display: inline-flex; flex-wrap: nowrap; gap: 4px; margin: 8px 0 14px; padding: 3px;
  background: var(--brand-tint); border: 1px solid var(--good-line); border-radius: 999px; }
.pf-kinds .subtab { padding: 6px 20px; font-size: 13px; font-weight: 600; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--text); }
.pf-kinds .subtab:hover { background: var(--panel); color: var(--text); }
.pf-kinds .subtab.on { background: var(--brand-ink); color: var(--on-ink); border-color: var(--brand-ink); box-shadow: 0 2px 8px var(--good-line); }
@media (max-width: 600px) { .subtabs.pf-kinds { display: flex; } .pf-kinds .subtab { flex: 1 1 0; text-align: center; padding: 7px 12px; } }

/* ---------- График акции (chart.php): свой график с рисованием и индикаторами ---------- */
.sc { --sc-bg: var(--panel); --sc-fg: var(--text); --sc-grid: #eceef3; --sc-muted: #6b7385; --sc-faint: #a5acba; --sc-up: #089981; --sc-dn: #f23645; --sc-lbl: #4b5568; --sc-cross: #787b86; --sc-accent: #2962ff; --sc-font: Inter, Arial, sans-serif; position: relative; }
:root[data-theme="dark"] .sc { --sc-grid: #26303d; --sc-muted: #9aa4b5; --sc-faint: #566174; --sc-lbl: #3b4658; --sc-cross: #8a94a3; }
main .card.sc-head { overflow: visible; }   /* список подсказок выходит за край карточки (иначе правило main .card обрезает его скроллом) */
.sc-head { display: grid; grid-template-columns: minmax(220px, 320px) 1fr auto; gap: 12px 18px; align-items: end; }
.sc-lab { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sc-search { position: relative; }
.sc-search input { width: 100%; box-sizing: border-box; padding: 6px 10px; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); }
.sc-sugg { position: absolute; z-index: 40; left: 0; right: 0; top: 100%; margin-top: 4px; max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 45, .18); }
.sc-sugg button { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.sc-sugg button:last-child { border-bottom: 0; }
.sc-sugg button b { min-width: 64px; }
.sc-sugg button span { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-sugg button i { color: #e0a100; font-style: normal; }
.sc-sugg button:hover, .sc-sugg button.sel { background: var(--good-bg); }
.sc-sug-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.sc-title { min-width: 0; }
.sc-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.sc-quote { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 2px; }
.sc-price { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-chg { font-size: 14px; font-variant-numeric: tabular-nums; }
.sc-chg.up { color: var(--good); } .sc-chg.dn { color: var(--bad); }
.sc-sess { font-size: 12px; color: var(--muted); }
.sc-sess.on { color: var(--good); }
.sc-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sc-actions .chip, .sc-bar .chip { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 5px 11px; }
#scFav[aria-pressed="true"] { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-fg); }
.sc-favs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.sc-favs .chip { font-size: 12px; padding: 3px 9px; }
.sc-card { padding: 10px 12px 12px; margin-top: 12px; }
.sc-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sc-tf, .sc-tools-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sc-tf .chip { padding: 4px 10px; font-size: 13px; min-width: 38px; text-align: center; }
.sc-bar .chip[aria-pressed="true"] { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }
#indBtn b { font-weight: 600; }
.sc-only-narrow { display: none !important; }
.sc-chartwrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sc-bg); }
.sc-chartbox { position: relative; height: clamp(380px, 68vh, 680px); padding-left: 0; }
.sc-chartbox.hasdt { padding-left: 44px; box-sizing: border-box; }
#cv { display: block; width: 100%; height: 100%; max-height: none; touch-action: pan-y; cursor: crosshair; outline: none; }
.sc-chartbox.dlock #cv { cursor: default; }
.sc-chartbox.drawing #cv { touch-action: none; }
.sc-indlg { position: absolute; left: 50px; top: 0; right: 70px; height: 100%; pointer-events: none; }
.sc-indlg .ilg { position: absolute; left: 0; display: flex; flex-direction: column; gap: 1px; pointer-events: none; font-size: 12px; }
.ilrow { display: flex; align-items: center; gap: 8px; pointer-events: auto; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--panel) 75%, transparent); color: var(--text); }
.ilrow.off { opacity: .5; }
.ilrow .nm i { font-style: normal; color: var(--muted); margin-left: 4px; }
.ilrow .vals { display: inline-flex; gap: 8px; font-variant-numeric: tabular-nums; }
.ilrow button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 13px; line-height: 1.4; }
.ilrow button:hover { color: var(--text); }
.sc-msg { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 20px; background: color-mix(in srgb, var(--panel) 82%, transparent); color: var(--text); font-size: 14px; }
.sc-msg span { color: var(--muted); font-size: 13px; }
.sc-msg.busy::after { content: ''; width: 22px; height: 22px; border: 3px solid var(--line-strong); border-top-color: var(--brand); border-radius: 50%; animation: scspin .8s linear infinite; }
@keyframes scspin { to { transform: rotate(360deg); } }
.sc-go { position: absolute; right: 74px; bottom: 30px; z-index: 4; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(20, 30, 45, .2); }
.sc-foot { margin: 8px 2px 0; font-size: 12px; }
.sc-save.bad { color: var(--bad); }
.sc-toast { position: fixed; z-index: 400; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: 90vw; padding: 8px 14px; border-radius: 8px; background: var(--brand-night); color: #fff; font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.sc.sc-full { position: fixed; inset: 0; z-index: 300; background: var(--bg); padding: 10px; overflow: auto; }
.sc.sc-full .sc-chartbox { height: calc(100vh - 190px); }
body.sc-lock { overflow: hidden; }

/* панель рисования слева от графика */
.dtools { position: absolute; left: 0; top: 0; bottom: 0; width: 44px; z-index: 3; display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 0; overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--line); background: var(--panel); scrollbar-width: none; }
.dtools::-webkit-scrollbar { display: none; }
.dtools hr { border: 0; border-top: 1px solid var(--line); margin: 3px 6px; }
.dtg { position: relative; display: flex; justify-content: center; }
.dti { width: 34px; height: 30px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.dti:hover { background: var(--panel-2); color: var(--text); }
.dti[aria-pressed="true"] { background: var(--good-bg); color: var(--good); }
.dti svg, .dfly svg { width: 18px; height: 18px; }
.dtm { position: absolute; right: -1px; top: 0; bottom: 0; width: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; opacity: .55; }
.dtm:hover { opacity: 1; } .dtm svg { width: 8px; height: 8px; }
.demo { font-size: 16px; line-height: 1; }
.dfly { position: fixed; z-index: 350; min-width: 220px; max-height: min(70vh, 520px); overflow: auto; padding: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 10px 30px rgba(20, 30, 45, .25); }
.dfly h4 { margin: 4px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dfly hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.dfly button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.dfly button:hover { background: var(--panel-2); }
.dfly button[aria-pressed="true"] { background: var(--good-bg); }
.demj { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.demj button { justify-content: center; font-size: 17px; padding: 4px 0; }
.dtip { position: fixed; z-index: 360; padding: 4px 8px; border-radius: 5px; background: var(--brand-night); color: #fff; font-size: 12px; pointer-events: none; white-space: nowrap; }
.dhint { position: absolute; left: 54px; bottom: 28px; z-index: 4; max-width: calc(100% - 140px); padding: 5px 10px; border-radius: 6px; background: var(--brand-night); color: #fff; font-size: 12px; pointer-events: none; }
.dprops { position: absolute; z-index: 6; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: 560px; padding: 5px 7px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 6px 20px rgba(20, 30, 45, .22); }
.dsw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.dsw[aria-pressed="true"] { border-color: var(--text); }
.dsep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 3px; }
.dpb { min-width: 26px; height: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); font-size: 12px; cursor: pointer; }
.dpb i { display: block; width: 14px; background: currentColor; border-radius: 2px; }
.dpb[aria-pressed="true"] { background: var(--good-bg); border-color: var(--good-line); }
.dpb.del:hover { color: var(--bad); border-color: var(--bad-line); }
.dtxt { position: absolute; z-index: 7; min-width: 200px; padding: 4px 8px; font-size: 13px; border: 1px solid var(--brand); border-radius: 5px; background: var(--panel); color: var(--text); }
.ddlg { position: fixed; inset: 0; z-index: 380; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 15, 21, .5); }
.dbox { width: min(460px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--panel); color: var(--text); border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); overflow: hidden; }
.dhd { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dx { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.dfg { padding: 8px 14px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.dfr { display: flex; align-items: center; gap: 8px; }
.dfr input[type=number] { width: 90px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--field-bg); color: var(--text); }
.dopt { display: flex; flex-direction: column; gap: 4px; padding: 6px 14px; font-size: 13px; }
.dft { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dft .sp { flex: 1; }
.ddlg .btn { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer; }
.ddlg .btn.pri { background: var(--accent); color: var(--on-ink); border-color: var(--accent); }
.isrch { margin: 10px 14px 4px; padding: 6px 10px; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); }
.ilist { overflow: auto; padding: 4px 6px 8px; }
.ilist h5 { margin: 8px 8px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ilist button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.ilist button:hover { background: var(--panel-2); }
.ilist button span { color: var(--muted); font-size: 12px; }
@media (max-width: 820px) {
  .sc-head { grid-template-columns: 1fr; align-items: stretch; }
  .sc-actions { justify-content: flex-start; }
  .sc-only-narrow { display: inline-flex !important; }
  .sc:not(.sc-tools-open) .dtools { display: none; }
  .sc:not(.sc-tools-open) .sc-chartbox.hasdt { padding-left: 0; }
  .sc-indlg { left: 8px; }
  .sc-chartbox { height: clamp(340px, 62vh, 560px); }
  .dhint { left: 8px; }
}

/* ---------- График акции: правая панель со списками (как у TradingView) ---------- */
.sc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.sc-main { min-width: 0; }
.sc-head { grid-template-columns: minmax(0, 1fr) auto; }
.sc-mtabs { display: none; }
.sc-panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 2px var(--shadow); overflow: hidden; }
.sp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp-search { padding: 10px 10px 6px; }
.sp-search input { width: 100%; box-sizing: border-box; padding: 6px 10px; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); }
.sc-panel .sc-sugg { position: static; margin: 0; max-height: none; flex: 1 1 auto; overflow: auto; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.sc-panel.sp-searching .sp-tabs, .sc-panel.sp-searching .sp-cols, .sc-panel.sp-searching .sp-list, .sc-panel.sp-searching .sp-detail { display: none; }
.sp-tabs { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tabs button { flex: 0 0 auto; padding: 7px 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.sp-tabs button:hover { color: var(--text); }
.sp-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.sp-cols { display: flex; justify-content: space-between; padding: 5px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sp-list { flex: 1 1 auto; min-height: 140px; overflow-y: auto; overscroll-behavior: contain; }
.sp-row { position: relative; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.sp-row.on { background: var(--good-bg); box-shadow: inset 3px 0 0 var(--accent); }
.sp-go { flex: 1 1 auto; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 12px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.sp-row:not(.on) .sp-go:hover { background: var(--panel-2); }
.sp-t, .sp-p { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sp-t b, .sp-p b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-t i, .sp-p i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-t i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.sp-p { align-items: flex-end; flex: 0 0 auto; }
.sp-p i.up, .sp-t i .up { color: var(--good); } .sp-p i.dn, .sp-t i .dn { color: var(--bad); }
.sp-x { flex: 0 0 auto; width: 26px; border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; opacity: 0; }
.sp-row:hover .sp-x, .sp-x:focus-visible { opacity: 1; }
.sp-x:hover { color: var(--bad); }
.sp-empty, .sp-err { padding: 14px 12px; font-size: 13px; color: var(--muted); }
.sp-err { color: var(--bad); padding-bottom: 6px; }
.sp-detail { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 8px 12px 10px; max-height: 40%; overflow: auto; }
.sp-detail:empty { display: none; }
.sp-detail h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; }
.sp-grid > div { display: flex; flex-direction: column; min-width: 0; }
.sp-grid span { color: var(--muted); }
.sp-grid b { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sp-grid > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .sc-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .sc-panel { position: sticky; top: 8px; height: min(calc(100vh - 16px), 860px); }
}
@media (max-width: 899px) {
  .sc-mtabs { display: flex; gap: 0; margin-bottom: 10px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--panel); }
  .sc-mtabs button { flex: 1 1 0; padding: 9px 12px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
  .sc-mtabs button[aria-pressed="true"] { background: var(--brand-ink); color: var(--on-ink); }
  .sc:not(.sc-view-list) .sc-panel { display: none; }
  .sc.sc-view-list .sc-main { display: none; }
  .sc-head { grid-template-columns: minmax(0, 1fr); }
  .sc-panel { min-height: 60vh; }
  .sp-t i { max-width: 52vw; }
  .sp-go { padding: 11px 14px; } .sp-t b, .sp-p b { font-size: 16px; } .sp-t i, .sp-p i { font-size: 13px; }
  .sp-x { opacity: .5; width: 34px; }
  .sp-list { min-height: 50vh; }
}
.sc.sc-full .sc-layout { grid-template-columns: minmax(0, 1fr); }
.sc.sc-full .sc-panel, .sc.sc-full .sc-mtabs { display: none; }
/* кнопки панели: перебиваем общие стили кнопок сайта */
.sc-panel .sp-go, .sc-panel .sp-go:hover, .sc-panel .sp-x, .sc-panel .sp-x:hover { border: 0; border-radius: 0; box-shadow: none; margin: 0; background: transparent; min-height: 0; }
.sc-panel .sp-row:not(.on) .sp-go:hover { background: var(--panel-2); }
.sc-panel .sp-tabs button, .sc-panel .sp-tabs button:hover { border-radius: 0; box-shadow: none; background: transparent; }
.sc-panel .sp-tabs button { border: 0; border-bottom: 2px solid transparent; }
.sc-panel .sp-tabs button.on { border-bottom-color: var(--accent); }
.sc-panel .sp-x { opacity: 0; } .sc-panel .sp-row:hover .sp-x, .sc-panel .sp-x:focus-visible { opacity: 1; }
@media (max-width: 899px) { .sc-panel .sp-x { opacity: .5; } }
.sc-mtabs button, .sc-mtabs button:hover { border-radius: 0; box-shadow: none; margin: 0; }

/* Скринер облигаций: сворачивание панели фильтров */
.scr-fold { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 10px; }
.scr-fold #scrFold { display: inline-flex; align-items: center; gap: 6px; }
.scr-fold .ar { display: inline-block; transition: transform .15s; }
.scr-fold #scrFold.closed .ar { transform: rotate(-90deg); }
.scr-fold .muted { font-size: 13px; margin: 0; }

/* ---------- Подборки облигаций (screener.php без категории, picks.js) ---------- */
.pk-sec { margin: 0 0 24px; }
.pk-sec h2 { margin: 0 0 2px; }
.pk-sub { margin: 0 0 12px; font-size: 13px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pk-card, .pk-card:hover { display: grid; align-content: start; gap: 6px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; box-shadow: 0 1px 2px var(--shadow); }
.pk-card:hover { border-color: var(--accent); }
.pk-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pk-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--panel-2); color: var(--accent-2, var(--accent)); font-weight: 700; }
.pk-card b { font-size: 15px; text-wrap: balance; }
.pk-d { color: var(--muted); font-size: 13px; line-height: 1.4; }
.pk-n { color: var(--text); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pk-back { margin: 0 0 6px; font-size: 13px; }
.pk-h { margin: 0 0 4px; }
.pk-desc { max-width: 80ch; margin: 0 0 12px; }
.pk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.pk-ctls { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pk-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pk-ctl select { max-width: 100%; }
.pk-years { margin-bottom: 12px; gap: 6px; }
.pk-years .chip { font-size: 13px; padding: 4px 11px; }
.pk-cn { color: var(--muted); font-size: 11px; }
.pk-years .chip[aria-pressed="true"] { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }
.pk-years .chip[aria-pressed="true"] .pk-cn { color: inherit; opacity: .8; }
.pk-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 12px; }
.pk-sum > div { display: flex; flex-direction: column; padding: 10px 12px; background: var(--panel-2); border-radius: 6px; }
.pk-sum span { font-size: 12px; color: var(--muted); }
.pk-sum b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pk-sum i { font-style: normal; font-size: 12px; color: var(--muted); }
.pk-sum.ok > div:first-child b { color: var(--good); }
.pk-warn { margin: 0 0 10px; color: var(--bad); font-size: 13px; }
.pk-mt select { width: 100%; min-width: 220px; font-size: 13px; }
.pk-h3 { margin: 18px 0 8px; }
.pk-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pk-m { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; min-width: 0; }
.pk-m span { color: var(--muted); text-transform: capitalize; }
.pk-m b { font-size: 13px; overflow-wrap: anywhere; }
.pk-m i { font-style: normal; color: var(--muted); }
.pk-m.on { background: var(--good-bg); border-color: var(--good-line, var(--line)); }
@media (max-width: 600px) { .pk-grid { grid-template-columns: 1fr; } .pk-cal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 1.38.2: поиск в шапке таблицы выпусков */
.scr .scr-bar .scr-q { flex: 1 1 220px; max-width: 340px; margin-left: auto; }
@media (max-width: 600px) { .scr .scr-bar .scr-q { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; } }

/* 1.39.0: номер по порядку в таблицах выпусков; значения в строке на одном уровне по центру */
.scr-table th.rn, .scr-table td.rn { width: 1%; min-width: 0; padding-left: 4px; padding-right: 2px; text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.scr-table td.rn { font-size: 11px; }
.scr-table th.rn { cursor: default; }
.scr-table td:first-child.rn { min-width: 0; }
.scr-table td.rn + td { min-width: 150px; }
.scr-table td, .scr-table td .mini { line-height: 1.3; }

/* 1.39.1: в таблицах выпусков и акций первые строки всех ячеек стоят на одной линии (по базовой линии текста),
   вторые строки (ISIN, рубли купона и т. п.) висят под ними */
.scr-table td { vertical-align: baseline; }
.scr-table td.rn { vertical-align: baseline; }

/* 1.39.2: стрелка сортировки не переносится на новую строку отдельно от слова, поэтому подписи столбцов стоят на одной линии */
.scr-table th button.th::after, .scr-table th a.th::after { content: "\00a0↕"; }
.scr-table th.s-asc button.th::after, .scr-table th.s-asc a.th::after { content: "\00a0↑"; }
.scr-table th.s-desc button.th::after, .scr-table th.s-desc a.th::after { content: "\00a0↓"; }
.scr-table th { vertical-align: bottom; }

/* 1.40.0: плавный переход между страницами (CSS View Transitions, без JavaScript).
   Шапка остаётся на месте, меняется только содержимое. В браузерах без поддержки правило просто игнорируется. */
@view-transition { navigation: auto; }
header { view-transition-name: site-header; }
::view-transition-group(site-header) { animation-duration: 0s; }
::view-transition-old(root) { animation: rv-fade-out .12s ease-out both; }
::view-transition-new(root) { animation: rv-fade-in .18s ease-in both; }
@keyframes rv-fade-out { to { opacity: 0; } }
@keyframes rv-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* Полоса прокрутки не должна сдвигать страницу вбок при переходе между короткой и длинной страницей */
html { scrollbar-gutter: stable; }

/* 1.40.1: одна ширина (1320 px) и одни боковые поля на всех страницах; логотип и меню выровнены по левому краю содержимого */
:root { --gx: max(20px, calc((100% - 1320px) / 2 + 20px)); }
header { padding-left: var(--gx); padding-right: var(--gx); }
.dark-strip { padding-left: var(--gx); padding-right: var(--gx); }
@media (max-width: 640px) {
  :root { --gx: 12px; }
}

/* 1.40.2: поля ввода и списки на страницах не растягиваются на всю ширину сайта (личный кабинет, настройки, формы).
   Низкая специфичность (:where): любое более точное правило с шириной (поиск, фильтры, сетки) продолжает работать. */
main :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="color"]), select) { max-width: 420px; }
/* там, где поле должно занимать всю свою область */
.sc-search input, .sp-search input, .nt-search input, .nt-swatch input, .cost-inp, .pk-mt select { max-width: none; }

/* 1.41.0: дивидендный календарь */
.dv-years { margin: 0 0 12px; gap: 6px; }
.dv-years .chip { font-size: 13px; padding: 4px 12px; text-decoration: none; color: var(--text); }
.dv-years .chip[aria-pressed="true"] { background: var(--sel); color: var(--on-ink); border-color: var(--sel); }
.dv-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 14px; }
.dv-form button { margin-top: 0; }
.dv-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); margin: 0; }
.dv-chk input { width: auto; }
.dv-table tr.dv-past td { color: var(--muted); }
.dv-table tr.dv-past b { font-weight: 500; }

.dv-chart { max-width: 720px; margin: 4px 0 14px; }
.dv-bars { display: block; width: 100%; height: auto; }
.dv-bars .dv-axis { stroke: var(--line-strong); stroke-width: 1; }
.dv-bars .dv-bar { fill: var(--accent-2); }
.dv-bars .dv-bar.dv-cur { fill: var(--accent-2); opacity: .55; }
.dv-bars text { font: 12px/1 var(--font, system-ui, sans-serif); fill: var(--muted); }
.dv-bars .dv-val { fill: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 1.41.0: плавная подгрузка в скринере и подборках — место под таблицу резервируется, содержимое проявляется без скачка */
#picks{min-height:60vh}
#scrTable{min-height:50vh}
#scrTop{min-height:96px}
@keyframes scrIn{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:no-preference){
  #picks>*,#scrTable>*,#scrTop>*{animation:scrIn .25s ease-out}
}

/* 1.43.0: терминал графика на странице акции */
.sc-embed .sc-head, .sc-embed .sc-panel, .sc-embed .sc-mtabs { display: none; }
.sc-embed .sc-layout { grid-template-columns: minmax(0, 1fr); }
.st-term-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 8px; }
.st-term-bar h2 { margin: 0; }

/* 1.44.0: главная для гостей */
.gl-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 420px); gap: 28px 40px; align-items: start; margin-top: 18px; }
.gl-intro h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; margin: 8px 0 14px; text-wrap: balance; }
.gl-sub { font-size: 16px; line-height: 1.5; color: var(--muted); margin: 0 0 14px; max-width: 60ch; }
.gl-points { margin: 0 0 18px; padding-left: 18px; line-height: 1.6; }
.gl-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.gl-cta a { display: inline-block; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--text); background: var(--panel); font-weight: 600; }
.gl-cta a:first-child:not(.ghost) { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.gl-login .login-brand { margin-top: 0; }
.gl-sec { margin-top: 30px; }
.gl-sec > h2 { font-size: 20px; margin: 0 0 12px; }
.gl-src { font-size: 12px; margin: 8px 0 0; }
.gl-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.gl-two h3 { margin: 0 0 8px; font-size: 16px; }
.gl-lead { margin: 0 0 6px; }
.gl-curve { width: 100%; height: auto; display: block; }
.gl-grid { stroke: var(--line); stroke-width: 1; }
.gl-axis { fill: var(--muted); font-size: 11px; }
.gl-line { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linejoin: round; }
.gl-dot { fill: var(--brand, var(--accent)); fill-opacity: .7; }
.gl-table { width: 100%; }
.gl-lock { text-align: center; padding: 22px 16px; }
.gl-lock h3 { margin: 0 0 6px; }
.gl-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.gl-shot { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.gl-shot img { width: 100%; height: auto; display: block; }
.gl-shot figcaption { padding: 8px 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .gl-hero, .gl-two { grid-template-columns: minmax(0, 1fr); } .gl-login .login-card { max-width: none; } }
.gl-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gl-sec .guest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .gl-sec .guest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gl-sec .guest-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .gl-axis { font-size: 20px; } .gl-line { stroke-width: 4; } .gl-dot { r: 5; } }

/* 1.45.0: виджет поддержки — круглая кнопка справа внизу и сворачиваемое окно */
.sw { position: fixed; right: 18px; bottom: 18px; z-index: 250; font-size: 14px; }
.sw button.sw-fab { width: 58px; height: 58px; padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.14); cursor: pointer;
  background: linear-gradient(145deg, #243142, #121A24); box-shadow: 0 6px 18px rgba(12,18,26,.32), 0 0 0 0 rgba(30,143,94,.5);
  display: grid; place-items: center; transition: transform .18s ease, box-shadow .18s ease; }
.sw button.sw-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 22px rgba(12,18,26,.38); }
.sw button.sw-fab:focus-visible { outline: 3px solid #3DD68C; outline-offset: 3px; }
.sw button.sw-fab svg { width: 36px; height: 36px; overflow: visible; }
.sw-head { fill: #F2F5F9; } .sw-ear { fill: #9FB0C3; } .sw-eye { fill: #121A24; } .sw-mouth { fill: none; stroke: #121A24; stroke-width: 2.4; stroke-linecap: round; }
.sw-ant { stroke: #9FB0C3; stroke-width: 2.4; stroke-linecap: round; } .sw-ant-dot { fill: #3DD68C; }
.sw:not(.sw-open) .sw button.sw-fab { animation: swPulse 3.2s ease-out 2s 2; }
@keyframes swPulse { 0% { box-shadow: 0 6px 18px rgba(12,18,26,.32), 0 0 0 0 rgba(61,214,140,.55); } 70%,100% { box-shadow: 0 6px 18px rgba(12,18,26,.32), 0 0 0 16px rgba(61,214,140,0); } }
.sw-panel { position: absolute; right: 0; bottom: 72px; width: min(360px, calc(100vw - 32px)); background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(12,18,26,.28); overflow: hidden;
  opacity: 0; transform: translateY(10px) scale(.97); transform-origin: bottom right; transition: opacity .2s ease, transform .2s ease; }
.sw-open .sw-panel { opacity: 1; transform: none; }
.sw-head-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px;
  background: linear-gradient(135deg, #1B2635, #121A24); color: #F2F5F9; }
.sw-head-bar b { display: block; font-size: 16px; }
.sw-head-bar span { display: block; margin-top: 2px; font-size: 12px; color: #9FB0C3; }
.sw button.sw-x { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #F2F5F9; font-size: 20px; line-height: 1; cursor: pointer; }
.sw button.sw-x:hover { background: rgba(255,255,255,.2); }
.sw-form, .sw-done { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.sw-form[hidden], .sw-done[hidden] { display: none; }
.sw-chips { display: flex; gap: 6px; }
.sw button.sw-chip { flex: 1; padding: 7px 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer; }
.sw button.sw-chip[aria-pressed="true"] { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.sw-form textarea, .sw-form input[type="text"] { width: 100%; max-width: none; box-sizing: border-box; font: inherit; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); }
.sw-form textarea { min-height: 112px; resize: vertical; line-height: 1.4; }
.sw-form textarea:focus, .sw-form input[type="text"]:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.sw-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sw button.sw-send { width: 100%; padding: 10px 14px; border-radius: 9px; border: 0; background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.sw button.sw-send:hover { filter: brightness(1.08); } .sw button.sw-send:disabled { opacity: .6; cursor: default; }
.sw-note { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.sw-err { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(181,72,58,.12); color: var(--bad, #b5483a); font-size: 13px; }
.sw-err[hidden] { display: none; }
.sw-done { align-items: center; text-align: center; padding: 26px 18px; }
.sw-done p { margin: 0 0 6px; color: var(--muted); }
.sw-ok { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: 24px; font-weight: 700; }
@media (max-width: 600px) { .sw { right: 12px; bottom: 12px; } .sw button.sw-fab { width: 52px; height: 52px; } .sw-panel { bottom: 64px; } }
@media (prefers-reduced-motion: reduce) { .sw-panel, .sw button.sw-fab { transition: none; } .sw:not(.sw-open) .sw button.sw-fab { animation: none; } }
.sup-item { margin-top: 10px; } .sup-top { margin-bottom: 6px; } .sup-msg { line-height: 1.5; margin-bottom: 6px; overflow-wrap: anywhere; }
.sup-meta { font-size: 12px; } .sup-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.sw button { margin: 0; }
.sw button.sw-fab:hover { background: linear-gradient(145deg, #2B3A4F, #16202D); border-color: rgba(255,255,255,.22); }
.sw button.sw-x:hover { background: rgba(255,255,255,.2); border-color: transparent; }
.sw button.sw-chip:hover { background: var(--panel-2); border-color: var(--muted); }
.sw button.sw-chip[aria-pressed="true"]:hover { background: var(--brand-tint); border-color: var(--brand); }
.sw button.sw-send:hover { background: var(--brand); border-color: var(--brand); }
.sw button.sw-x { padding: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 0; }
.sw button.sw-fab { padding: 0; }

/* 1.47: калькуляторы «Сравнения и подбор» (calcs.php) */
.ce-tabs { margin-top: -4px; }
.calc-check { display: flex; align-items: center; gap: 8px; margin: 0; padding-bottom: 8px; }
.calc-check input { width: auto; margin: 0; }
.ce-bars, .ce-line { display: block; width: 100%; max-width: 560px; height: auto; margin-top: 14px; }
.ce-bar { fill: var(--accent); }
.ce-bar0 { fill: var(--line); }
.ce-lab { font-size: 11px; fill: var(--muted); }
.ce-val { font-size: 10px; fill: var(--text); font-variant-numeric: tabular-nums; }
.ce-axis { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.ce-l1 { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.ce-l2 { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 4; }
.ce-key { display: inline-block; width: 22px; height: 0; border-top: 2.2px solid var(--accent); vertical-align: middle; }
.ce-key.ce-k2 { border-top: 2px dashed var(--muted); }
.ce-disc { margin-top: 8px; }

/* 1.47.2: пункты меню в одну линию — ссылки и выпадающие пункты имеют одинаковый блок */
.dark-strip nav.menu { align-items: stretch; }
.dark-strip nav.menu > a.top-link,
.dark-strip details.dd > summary {
  display: flex; align-items: center; box-sizing: border-box; height: 38px; margin: 0; padding-top: 0; padding-bottom: 0; line-height: 20px;
}
.dark-strip details.dd { display: flex; margin-top: 0; }
.dark-strip details.dd > summary::after { line-height: 1; }


/* ==================== 1.48.2: компактный вид на телефоне ==================== */
@media (max-width: 640px) {
  body { font-size: 13px; }
  h1 { font-size: 20px; }
  h2 { font-size: 16px; margin-bottom: 10px; }
  .scr h1, .cardx-head h1, .mk-head h1, .is-head h1, .ev-head h1 { font-size: 20px; }
  main { margin-top: 10px; padding: 0 10px; }
  .card { padding: 12px 12px; }
  /* шапка: логотип и кнопки в одну компактную линию */
  header .brand { font-size: 22px; }
  header .brandrow { padding-top: 6px; padding-bottom: 4px; gap: 6px; }
  .hdr-right { gap: 8px; flex-wrap: wrap; }
  header .ver { font-size: 10px; }
  button.hdr-theme { padding: 2px 8px; font-size: 11px; }
  /* меню: плотнее, меньше строк */
  .dark-strip { padding: 2px 10px 6px; }
  .dark-strip nav.menu { gap: 0 2px; }
  .dark-strip nav.menu > a.top-link, .dark-strip details.dd > summary { height: 32px; padding-left: 8px; padding-right: 8px; font-size: 13px; }
  /* уведомление «Ночной импорт»: одна строка, без длинного хвоста */
  .ev-banner { padding: 7px 10px; margin-bottom: 10px; gap: 6px 10px; }
  .ev-text { flex-basis: 100%; font-size: 12px; }
  .ev-top { display: none; }
  .ev-actions { width: 100%; justify-content: flex-start; gap: 14px; }
  .ev-actions button.ghost { padding: 3px 10px; font-size: 11px; }
  /* кнопки, поля, чипы мельче; шрифт полей 16px, чтобы iOS не увеличивал страницу */
  input, select, textarea { padding: 6px 9px; font-size: 16px; }
  button { margin-top: 10px; padding: 7px 14px; font-size: 13px; }
  .chip, .scr .chip, .scr .chip:hover { padding: 3px 9px; font-size: 12px; }
  .chips { gap: 6px; margin-bottom: 10px; }
  .sc-actions .chip, .sc-bar .chip { padding: 3px 9px; font-size: 12px; }
  .scr .tabs button, .scr .tabs button:hover { padding: 6px 10px; font-size: 12px; }
  label { margin-top: 10px; }
  /* кнопка помощи на нижнем краю меньше и не закрывает контент */
  .sw { right: 8px; bottom: 8px; }
  .sw button.sw-fab { width: 42px; height: 42px; }
  .sw-panel { bottom: 52px; }
}


/* ==================== 1.48.4: поля ввода короче (на ~40%) ==================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]), select { max-width: 400px; }
@media (max-width: 640px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]), select { max-width: 100%; }
}


/* ==================== 1.49.0: страница входа — бегущая строка рынка, компактное окно входа ==================== */
.gl-ticker { overflow: hidden; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tk-track { display: flex; width: max-content; animation: tkMove 60s linear infinite; }
.gl-ticker:hover .tk-track { animation-play-state: paused; }
.tk-set { display: flex; flex: 0 0 auto; }
.tk-i { white-space: nowrap; padding: 8px 22px; font-size: 13px; font-variant-numeric: tabular-nums; border-right: 1px solid var(--line); color: var(--text); }
.tk-i b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.tk-i i { font-style: normal; font-weight: 600; }
.tk-i i.up { color: var(--good); }
.tk-i i.dn { color: var(--bad); }
@keyframes tkMove { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .gl-ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; } .tk-track { animation: none; } .tk-set + .tk-set { display: none; } }
/* окно входа меньше */
.gl-login .login-brand { margin: 0 0 8px; gap: 4px; }
.gl-login .login-brand .logo { font-size: 34px; }
.gl-login .login-brand p { display: none; }
.gl-login .login-card { max-width: 340px; padding: 14px 16px; }
.gl-login .login-card h2 { font-size: 16px; margin: 0 0 6px; }
.gl-login .login-card input { max-width: none; }
.gl-login .login-card button[type="submit"] { width: 100%; }
.gl-login .auth-links { margin-top: 8px; font-size: 12px; }
.gl-login .demo-entry { max-width: 340px; margin: 10px auto 0; padding: 10px 16px; }
.gl-login .demo-entry h3 { font-size: 14px; margin: 0 0 4px; }
.gl-login .demo-entry .auth-hint { font-size: 12px; margin: 0 0 4px; }
.gl-hero { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 340px); justify-content: space-between; }
@media (max-width: 900px) { .gl-login .login-card, .gl-login .demo-entry { max-width: none; } }
.gl-mini { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.gl-disc p { font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 110ch; margin: 0 0 8px; }
.gl-disc p b { color: var(--text); }
@media (max-width: 900px) { .gl-hero { grid-template-columns: minmax(0, 1fr); } }


/* ==================== 1.49.1: вход в окне, две кнопки, показ пароля ==================== */
.gl-hero { grid-template-columns: minmax(0, 1fr); }
.gl-cta { gap: 10px; margin-bottom: 10px; }
.gl-cta .gl-b { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; margin: 0; min-width: 160px; height: 40px; padding: 0 22px;
  border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.gl-cta .gl-b1, .gl-cta .gl-b1:hover { background: var(--accent); border: 1px solid var(--accent); color: var(--on-ink); }
.gl-cta .gl-b2, .gl-cta .gl-b2:hover { background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); }
.gl-cta .gl-b:hover { filter: brightness(1.08); }
.gl-demo { margin: 0; }
.gl-demo button.linklike { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.gl-demo button.linklike:hover { color: var(--text); }
dialog.login-dlg { width: min(340px, calc(100vw - 32px)); box-sizing: border-box; padding: 16px 18px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text); }
dialog.login-dlg::backdrop { background: rgba(10, 14, 20, .55); }
.ld-head { display: flex; align-items: center; justify-content: space-between; }
.ld-head h2 { margin: 0; font-size: 17px; }
button.ld-x, button.ld-x:hover { margin: 0; padding: 0 6px; background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
dialog.login-dlg input { max-width: none; }
dialog.login-dlg button.ld-go { width: 100%; margin-top: 14px; }
.ld-links { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
/* показать пароль */
.pw-wrap { position: relative; display: block; max-width: 400px; }
.pw-wrap input { max-width: none; padding-right: 36px; }
button.pw-eye, button.pw-eye:hover { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); margin: 0; padding: 4px 6px; background: none; border: 0; color: var(--muted); line-height: 0; cursor: pointer; }
button.pw-eye:hover { color: var(--text); }


/* ==================== 1.50.1: терминал на всё окно; список бумаг и в режиме «На весь экран» ==================== */
@media (min-width: 900px) {
  .sc.sc-full .sc-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .sc.sc-full .sc-panel { display: flex; }
  .sc.sc-full { --sc-h: calc(100vh - 20px); overflow: hidden; }
  .sc.sc-full .sc-chartbox.hasdt, .sc.sc-page .sc-chartbox.hasdt { padding-left: 44px; }
  .sc.sc-page .sc-layout, .sc.sc-full .sc-layout { height: var(--sc-h, calc(100vh - 150px)); min-height: 520px; align-items: stretch; }
  .sc.sc-page .sc-main, .sc.sc-full .sc-main { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
  .sc.sc-page .sc-main > .sc-card, .sc.sc-full .sc-main > .sc-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
  .sc.sc-page .sc-chartwrap, .sc.sc-full .sc-chartwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .sc.sc-page .sc-chartbox, .sc.sc-full .sc-chartbox { flex: 1 1 auto; height: auto; min-height: 0; }
  .sc.sc-page .sc-panel, .sc.sc-full .sc-panel { position: static; height: auto; min-height: 0; }
  .sc.sc-page .sc-main > .sc-head, .sc.sc-full .sc-main > .sc-head { margin-bottom: 0; }
}
/* страница терминала на всю ширину окна: боковые поля минимальные, заголовок компактный, панель бумаг шире на больших мониторах */
main:has(> .sc-page) { max-width: none; margin-top: 10px; margin-bottom: 16px; padding: 0 12px; }
.sc-h1 { font-size: 16px; margin: 0 0 6px; }
.sc-h1 .help-btn, .sc-h1 .faq-q { margin-top: 0; }
@media (min-width: 1700px) { .sc-layout { grid-template-columns: minmax(0, 1fr) 360px; } .sc.sc-full .sc-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (min-width: 2300px) { .sc-layout { grid-template-columns: minmax(0, 1fr) 420px; } .sc.sc-full .sc-layout { grid-template-columns: minmax(0, 1fr) 420px; } }

/* 1.50.2: таймфреймы — основные на панели, остальные в выпадающем списке */
.sc-tf { position: relative; }
.sc-tf .chip.tf-more { min-width: 30px; padding: 4px 9px; }
.tf-menu { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 160px; padding: 4px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px var(--shadow, rgba(0,0,0,.18)); display: flex; flex-direction: column; }
.tf-menu button, .tf-menu button:hover { margin: 0; width: 100%; text-align: left; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; }
.tf-menu button:hover { background: var(--panel-2); }
.chip.sc-icon { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; min-width: 0; }


/* ==================== 1.51.0: шапка терминала убрана; «В избранное» и «Карточка» — в панели над графиком; в списке бумаг отдельный столбец «За день» ==================== */
.sc-qdata { display: none; }
.sc-embed #scFav, .sc-embed #scStockLink { display: none; }
.sc-tools-row #scStockLink { text-decoration: none; }
.sc-card { margin-top: 0; }
.sc-cols-x { }
.sp-cols, .sc-panel .sp-go { display: grid; grid-template-columns: minmax(0, 1fr) 66px 84px; column-gap: 8px; align-items: center; }
.sp-cols { padding: 5px 12px; }
.sp-cols span:nth-child(n+2) { text-align: right; }
.sp-c { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.sp-c.up { color: var(--good); } .sp-c.dn { color: var(--bad); }
.sc-panel .sp-p { display: block; text-align: right; }
.sc-panel .sp-p b { font-size: 14px; }
.sp-row .sp-x { position: absolute; right: 0; top: 0; bottom: 0; width: 24px; background: var(--panel); }
@media (max-width: 899px) { .sp-cols { padding: 5px 14px; } .sp-c { font-size: 14px; } .sc-panel .sp-p b { font-size: 16px; } }

/* ==================== 1.52.1: главная при закрытом сайте, кнопка демо ==================== */
.gl-cta { flex-wrap: wrap; align-items: center; }
.gl-cta .gl-demo { display: contents; }
.gl-cta .gl-demo button.gl-b { background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; }
.gl-maint { box-sizing: border-box; margin: 0 0 18px; padding: 14px 18px; border: 2px solid #d9a21b; border-left-width: 6px; border-radius: 10px; background: #fff4d6; color: #5c4400; }
.gl-maint .gm-t { display: block; font-size: 18px; margin-bottom: 4px; }
.gl-maint p { margin: 4px 0 0; color: inherit; }
.gl-maint .gm-u { font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gl-maint { background: #3a2e0c; border-color: #b88a14; color: #f3dfa2; } }
:root[data-theme="dark"] .gl-maint { background: #3a2e0c; border-color: #b88a14; color: #f3dfa2; }

/* ==================== 1.52.3: главная — три колонки, кнопки отдельной полосой ==================== */
.gl-intro { max-width: none; }
.gl-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 18px; }
.gl-col { box-sizing: border-box; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); min-width: 0; }
.gl-col h2 { margin: 0 0 8px; font-size: 18px; }
.gl-col .gl-lead { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.gl-col .gl-points { margin: 0; padding-left: 18px; font-size: 13.5px; }
.gl-col .gl-points li { margin: 5px 0; }
.gl-col.gl-main { border: 2px solid var(--accent); }
.gl-col.gl-main h2::after { content: "главное"; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-ink); font-size: 11px; font-weight: 600; vertical-align: middle; letter-spacing: .04em; text-transform: uppercase; }
.gl-cta-band { display: flex; justify-content: center; padding: 18px 16px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.gl-cta-band .gl-cta { justify-content: center; margin: 0; gap: 12px; }
.gl-cta-band .gl-cta .gl-b { height: 46px; min-width: 190px; font-size: 15px; }
@media (max-width: 900px) { .gl-cols { grid-template-columns: minmax(0, 1fr); } .gl-cta-band .gl-cta .gl-b { width: 100%; } }

/* ==================== 1.53.1: спокойная палитра — нейтральная основа, изумруд только для главных кнопок и роста ==================== */
:root {
  --accent: #0B7A5A;          /* главные кнопки, ссылки-акценты */
  --accent-2: #096347;
  --sel: #16202B;             /* выбранные вкладки, фильтры, периоды */
  --on-ink: #ffffff;
  --bg: #F3F4F6;
  --brand-frost: #F3F4F6;
  --brand-mist: #EEF0F3;
  --line: #DADDE3;
  --line-strong: #C3C9D2;
  --text: #16202B;
  --brand-ink: #16202B;
  --muted: #5F6B7A;
  --good: #15803D;
  --chart-fill: rgba(22, 32, 43, 0.08);
  --chart-grid: #E3E6EB;
}
:root[data-theme="dark"] {
  --accent: #E6EAF0;         /* как было до 1.53: в тёмной теме акцент светло-серый */
  --accent-2: #B9C2CF;
  --sel: #E6EAF0;
  --on-ink: #141B24;
  --brand-ink: #E6EAF0;
  --text: #E6EAF0;
  --muted: #97A1B0;
  --bg: #0F151D;
  --brand-frost: #0F151D;
  --brand-mist: #1E2936;
  --line: #2A3544;
  --line-strong: #3A4656;
  --chart-fill: rgba(230, 234, 240, 0.08);
  --chart-grid: #2A3544;
}
.gl-col.gl-main { border-color: var(--accent); }
.gl-col.gl-main h2::after { background: var(--accent); color: var(--on-ink); }

/* 1.54.2: ключевая ставка на кривой для гостей */
.gl-key { stroke: var(--bad); stroke-width: 1.4; stroke-dasharray: 4 3; }
.gl-keyt { fill: var(--bad); font-size: 11px; }
@media (max-width: 560px) { .gl-keyt { font-size: 20px; } .gl-key { stroke-width: 3; } }

/* 1.55.1: гостевая кривая аккуратнее */
.gl-zone-up { fill: var(--brand); fill-opacity: .13; stroke: none; }
.gl-zone-dn { fill: var(--bad); fill-opacity: .09; stroke: none; }
.gl-grid { stroke-dasharray: 2 4; }
.gl-dot { fill-opacity: .82; stroke: var(--panel); stroke-width: 1.4; }
.gl-dot:hover { fill-opacity: 1; stroke-width: 2; }
.gl-line { stroke-width: 2.8; stroke-linecap: round; }

/* 1.56.0: страница «О проекте» */
.about .ab-h { margin: 26px 0 10px; font-size: 20px; }
.about .gl-cols { margin: 8px 0 4px; }
.about .card p { margin: 0 0 8px; }
.about .ab-end { margin-top: 26px; }

/* 1.58.0 Индикаторы */
.ind-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.ind-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ind-t-l { font-size: 12px; color: var(--muted); }
.ind-t-v { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ind-t-u { font-size: 13px; font-weight: 400; color: var(--muted); }
.ind-t-s { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ind-t-s.up { color: var(--accent); }
.ind-t-s.dn { color: #C0392B; }
.ind-spark { width: 100%; height: 28px; margin-top: 6px; }
.ind-spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ind-pick { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.ind-pick .mk-series { margin: 0; }
.ind-pl { font-size: 12px; padding-top: 6px; min-width: 78px; }
@media (max-width: 600px) { .ind-tiles { grid-template-columns: repeat(2, 1fr); } .ind-pick { flex-direction: column; gap: 4px; } }

/* 1.59.0 Резервные копии */
.link-btn { background: none; border: 0; padding: 0; margin: 0 0 0 8px; color: var(--link, var(--accent)); font: inherit; cursor: pointer; text-decoration: underline; }

/* 1.60.0 Избранное */
.fav-btn { background: none; border: 0; padding: 0 4px; margin: 0 4px 0 0; cursor: pointer; font-size: 17px; line-height: 1; color: var(--muted); vertical-align: -1px; }
.fav-btn:hover { color: #C58A00; }
.fav-btn.on { color: #D9A100; }
.fav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.fav-btn--lbl { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: inherit; margin: 0; }
.fav-btn--lbl.on { color: inherit; }
.fav-btn--lbl.on .fav-ic { color: #D9A100; }
.fav-tabs { margin-bottom: 12px; }
.fav-empty { text-align: center; padding: 28px 12px; }
.pk-card.pk-feat { border-color: var(--accent); }
.pk-in { display: inline-flex; gap: 6px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button.fav-btn:not(.fav-btn--lbl) { background: none; border: 0; box-shadow: none; min-height: 0; min-width: 0; width: auto; height: auto; padding: 0 4px; margin: 0 2px 0 0; border-radius: 4px; }
.pk-m u { text-decoration: none; font-weight: 600; color: var(--text); }

/* 1.60.3: ссылки снова графитовые, как до 1.53 (зелёным остаются главные кнопки и рост) */
:root { --link: #2E3A48; }
:root[data-theme="dark"] { --link: #B9C2CF; }
a { color: var(--link); }
a.ghost { color: var(--text); }
.guest-note a, .auth-links a { color: var(--link); }

/* 1.61.0 Логотипы эмитентов */
.sec-lg { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; }
.sec-lg-t { min-width: 0; text-align: left; }
.lg { position: relative; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: hsl(var(--h, 210) 40% 88%); color: hsl(var(--h, 210) 45% 26%); border: 1px solid var(--line); }
.lg .lg-i { font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.lg.lg-ofz .lg-i { font-size: 9px; letter-spacing: 0; }
.lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #ffffff; border-radius: 50%; }
.lg.lg-ok .lg-i { visibility: hidden; }
:root[data-theme="dark"] .lg { background: hsl(var(--h, 210) 25% 26%); color: hsl(var(--h, 210) 50% 82%); border-color: var(--line-strong); }
.ok-txt { color: var(--good); }

/* 1.61.1: первая колонка-номер не растягивается; звёздочка и метка в одной строке */
.scr-table td:first-child.num, .scr-table td:first-child.rn { min-width: 0; }
.sec-lg .fav-btn { margin: 0; padding: 0 2px; }
.sec-lg { flex-wrap: nowrap; }

/* 1.62.0: бумага из портфеля — звёздочка закреплена */
.fav-btn.auto { cursor: default; opacity: .75; }

/* 1.63.0: правовые документы */
.legal { max-width: 860px; margin: 0 auto; padding: 4px 0 24px; }
.legal h2 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { line-height: 1.55; }
.legal ul { padding-left: 20px; }
.legal .lg-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.legal .lg-tbl th, .legal .lg-tbl td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.legal .lg-tbl th { background: var(--panel-2); }
.lg-todo { background: #fff3b0; color: #5a4a00; padding: 0 4px; border-radius: 3px; }
:root[data-theme="dark"] .lg-todo { background: #5a4a00; color: #ffe98a; }
.lg-todo-note { background: #fff3b0; color: #5a4a00; padding: 8px 12px; border-radius: 6px; }
:root[data-theme="dark"] .lg-todo-note { background: #5a4a00; color: #ffe98a; }
.lg-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-2); }
.lg-banner-go { font-weight: 600; }
.lg-foot { margin-bottom: 6px; }
.lg-foot a { color: inherit; text-decoration: underline; }
.lg-chk { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13px; line-height: 1.4; }
.lg-chk input { margin-top: 3px; flex: none; }
.lg-accept { display: grid; gap: 10px; margin-top: 18px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 8px; }
.lg-accept label { display: flex; gap: 8px; align-items: flex-start; }

/* 1.64.0: знакомство с сайтом */
.tour-hl { position: fixed; z-index: 9990; border-radius: 8px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(10, 16, 24, .62), 0 0 0 3px #f5b301; transition: left .18s, top .18s, width .18s, height .18s; display: none; }
.tour-card { position: fixed; z-index: 9991; width: min(360px, calc(100vw - 24px)); box-sizing: border-box; padding: 14px 16px; border-radius: 10px; background: var(--panel, #fff); color: var(--text, #1b2330); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.tour-card h4 { margin: 2px 0 6px; font-size: 16px; }
.tour-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.tour-n { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tour-hint { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.tour-btns { display: flex; gap: 8px; justify-content: flex-end; }
.tour-btns button { margin: 0; }
.tour-back { background: transparent; border: 1px solid var(--line-strong); color: inherit; }
.tour-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
button.tour-link { background: none; border: 0; padding: 0; margin: 0; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.tour-bar { position: fixed; z-index: 9991; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; background: var(--panel, #fff); color: var(--text, #1b2330); border: 1px solid var(--line-strong); box-shadow: 0 6px 24px rgba(0, 0, 0, .3); font-size: 14px; }
.tour-bar button { margin: 0; }

/* 1.66.0: личный кабинет и плотность таблиц */
.cab-nav { font-size: 13px; color: var(--muted); margin: 4px 0 12px; line-height: 1.9; }
.cab-nav a { white-space: nowrap; }
button.danger-btn { background: var(--bad); border-color: var(--bad); color: #fff; }
button.danger-btn:hover { filter: brightness(.92); }
body.dens-compact td, body.dens-compact th { padding-top: 3px; padding-bottom: 3px; }
body.dens-compact .scr-table th, body.dens-compact .scr-table td { padding-top: 3px; padding-bottom: 3px; }
.usr-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0 12px; }
.usr-filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
.usr-filters input, .usr-filters select { margin: 0; }
.usr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.usr-stat { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); }
.usr-stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.usr-stat span { font-size: 12px; color: var(--muted); }
.usr-bars { display: flex; align-items: end; gap: 3px; height: 54px; margin: 6px 0 2px; }
.usr-bars i { flex: 1; min-width: 6px; background: var(--brand); border-radius: 2px 2px 0 0; opacity: .75; }
.usr-sec { margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
.usr-sec > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.usr-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.usr-acts form { margin: 0; }
.usr-acts button { margin: 0; font-size: 12px; padding: 3px 8px; }
.usr-acts a.btn-link { font-size: 12px; padding: 3px 8px; }

/* 1.66.4: широкий список выплат — на ширину экрана, колонками */
.ks-pop.wide { column-width: 300px; column-gap: 28px; }
.ks-pop.wide .ks-pt { column-span: all; margin-bottom: 4px; font-size: 14px; }
.ks-pop.wide .ks-m { break-inside: avoid; margin-bottom: 8px; }
.ks-pop.wide .ks-mon { margin-top: 0; }
.ce-ln1{stroke:#8a94a6;stroke-width:2;stroke-dasharray:5 3}.ce-ln2{stroke:#2e8b57;stroke-width:2.5}
.ce-ax{stroke:#8a94a6;stroke-width:1}.ce-k1{fill:#8a94a6}.ce-k2{fill:#2e8b57}
.ce-ex{width:18px;height:18px;cursor:pointer}
.ce-ln0{stroke:#8a94a6;stroke-width:1.5;stroke-dasharray:2 3}.ce-k0{fill:#8a94a6}
/* 1.66.8: обучение в калькуляторах */
.guide-btn { margin: 0 0 0 10px; padding: 3px 10px; font-size: 13px; font-weight: 500; vertical-align: middle; background: transparent; color: var(--accent, #0b7a5a); border: 1px solid var(--accent, #0b7a5a); border-radius: 999px; cursor: pointer; }
.guide-btn:hover { background: var(--accent, #0b7a5a); color: #fff; }
.ce-tip { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--muted, #8a94a6); color: var(--muted, #8a94a6); font-size: 10px; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.ce-tip:hover, .ce-tip:focus { color: var(--accent, #0b7a5a); border-color: var(--accent, #0b7a5a); outline: none; }
.ce-tipbox { position: fixed; z-index: 9995; max-width: min(320px, calc(100vw - 16px)); box-sizing: border-box; padding: 8px 11px; border-radius: 8px; background: var(--panel, #fff); color: var(--text, #1b2330); border: 1px solid var(--line-strong, #c5ccd6); box-shadow: 0 6px 22px rgba(0, 0, 0, .28); font-size: 13px; line-height: 1.45; font-weight: 400; text-transform: none; letter-spacing: 0; }

.tour-hl.tour-dim { box-shadow: 0 0 0 9999px rgba(10, 16, 24, .62); border-radius: 0; }

/* Панель индикаторов виджета TradingView (1.69.0) */
.tv-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0; }
.tv-panel .check { margin: 0; font-size: 13px; }
.tv-int { margin-left: auto; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tv-int select { width: auto; padding: 4px 8px; }

/* 1.70.0: меню «Личные данные» слева, вкладки портфеля и кнопки управления — внутри него */
.side-nav { order: -1; }
.side-nav .side-tabs { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.side-nav .side-tabs .subtab { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 14px; font-weight: 500; }
.side-nav .side-tabs .subtab:hover { background: var(--panel-2); color: var(--text); }
.side-nav .side-tabs .subtab.on { background: var(--good-bg); color: var(--ok-fg); border: 0; }
.side-nav .side-extra { padding-bottom: 8px; }
.side-nav .side-tools { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.side-nav .side-tools .pf-del-open { flex: 1 1 auto; padding: 6px 10px; font-size: 12px; }
.side-nav .side-tools a { padding: 0; }
@media (max-width: 900px) {
  .side-nav .side-tabs { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-bottom: 0; margin-bottom: 4px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .side-nav .side-tabs .subtab { flex: 0 0 auto; white-space: nowrap; }
  .side-nav .side-extra, .side-nav .side-tools { padding: 0; border: 0; }
}

/* 1.70.0: компактная статистика, мини-график и короткая подсказка выплат */
.ks-item { gap: 2px; }
.ks-k { font-size: 12px; }
.ks-spark { width: 100%; height: 34px; display: block; fill: var(--brand); opacity: .8; }
.ks-more { font-size: 12px; }
.ks-mrow { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; margin-top: 4px; }
.ks-mrow i { display: block; height: 6px; border-radius: 3px; background: var(--brand); opacity: .55; }
.ks-mrow b { font-variant-numeric: tabular-nums; }

/* 1.70.1: карточка статистики не скроллится; длинный список выплат — в две колонки */
main .card.ks-card { overflow: visible; }
.ks-pop .ks-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); column-gap: 22px; }
.ks-mrow { margin-top: 3px; }

/* 1.71.0: краткая статистика в виде двух колец */
.kn-switch { display: inline-flex; padding: 3px; margin: 0 0 10px; background: var(--panel-2); border-radius: 999px; }
.kn-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 6px 16px; border-radius: 999px; cursor: pointer; margin: 0; }
.kn-switch button.on { background: var(--text); color: var(--panel); }
.ks-old-wrap, .pf-struct { display: none; }
main .card.kn { overflow: visible; }
.kn-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kn-head h2 { margin: 0; }
.kn-trade { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kn-avail { display: flex; flex-direction: column; align-items: flex-end; margin-right: 6px; line-height: 1.2; }
.kn-avail small { color: var(--muted); font-size: 12px; }
.kn-btn { display: inline-block; border-radius: 999px; padding: 9px 22px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--line-strong); color: var(--text); background: transparent; }
.kn-btn.kn-buy { background: var(--brand); border-color: var(--brand); color: #fff; }
.kn-btn.kn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.kn-rings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kn-ring { background: var(--panel-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kn-rh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.kn-rh h3 { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.kn-more { font-size: 12px; }
.kn-sw { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel); border-radius: 999px; }
.kn-sw button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px; cursor: pointer; margin: 0; }
.kn-sw button.on { background: var(--text); color: var(--panel); }
.kn-dn { position: relative; width: 250px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.kn-dn.kn-big { width: 340px; }
.kn-dn svg { width: 100%; height: 100%; display: block; }
.kn-dn circle { fill: none; stroke-width: 22; transition: stroke-width .12s; }
.kn-dn circle.hov:hover { stroke-width: 27; }
.kn-dn .cross { stroke: var(--text); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 4 4; pointer-events: none; }
.kn-dn .qt { font: 700 11px system-ui, sans-serif; fill: var(--muted); }
.kn-dn .qs { font: 600 11px system-ui, sans-serif; fill: var(--text); font-variant-numeric: tabular-nums; }
.kn-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 0 27%; }
.kn-mid small { color: var(--muted); font-size: 12px; line-height: 1.25; }
.kn-mid b { font-size: 16px; font-variant-numeric: tabular-nums; }
.kn-mid span { font-size: 12px; color: var(--muted); }
.kn-mid .top { font-size: 11px; white-space: nowrap; }
.kn-leg { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.kn-leg .r { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.kn-leg i { width: 10px; height: 10px; border-radius: 50%; }
.kn-leg em { font-style: normal; color: var(--muted); font-size: 12px; }
.kn-leg small { display: block; color: var(--muted); font-size: 12px; }
.kn-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.kn-kv > div { display: flex; flex-direction: column; }
.kn-kv small { color: var(--muted); font-size: 12px; }
.kn-kv b { font-size: 16px; font-variant-numeric: tabular-nums; }
.kn-per { margin: 0; font-size: 13px; }
.kn-note { margin: 12px 0 0; font-size: 12px; }
@media (max-width: 760px) { .kn-rings { grid-template-columns: 1fr; } .kn-avail { align-items: flex-start; } }

.kn-mid .top { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.kn-mid { padding: 0 24%; }

/* 1.71.4: переключатель «Все акции / В портфеле» (ссылки в стиле kn-switch) */
.kn-switch a { display: inline-block; color: var(--muted); font-weight: 600; padding: 6px 16px; border-radius: 999px; text-decoration: none; }
.kn-switch a.on { background: var(--text); color: var(--panel); }
.kn-switch a .muted { color: inherit; opacity: .7; margin-left: 4px; }
.pfs-ctl { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pfs-ctl select { margin: 0; padding: 5px 10px; font-size: 13px; width: auto; max-width: 220px; }
.kn-sw button { white-space: nowrap; }
.pf-viz2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.pf-viz2 > .card { margin: 0; }
@media (max-width: 900px) { .pf-viz2 { grid-template-columns: minmax(0, 1fr); } }
.pf-curve-box { padding: 10px 8px 4px; border-radius: 12px; background: linear-gradient(180deg, var(--panel-2) 0%, transparent 85%); }

/* 1.72.6: кольцо «Плановый доход» — кварталы плитками по углам */
.kn-dn.kn-big { position: relative; width: 100%; max-width: 560px; aspect-ratio: auto; }
.kn-big .kn-rw { position: relative; width: 340px; max-width: 100%; margin: 0 auto; aspect-ratio: 1; }
.kn-big .kn-rw svg { width: 100%; height: 100%; display: block; }
.kn-big .kn-mid { padding: 0 24%; }
.kn-qs { position: absolute; inset: 0; pointer-events: none; }
.kn-qt { position: absolute; width: 132px; display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 8px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.07); pointer-events: auto; cursor: default; transition: transform .15s, box-shadow .15s; }
.kn-qt:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.kn-qt .t { font-size: 12px; font-weight: 700; color: var(--c); letter-spacing: .02em; }
.kn-qt b { font-size: 19px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kn-qt .sh { font-size: 12px; color: var(--muted); }
.kn-qt .bars { display: flex; align-items: flex-end; gap: 4px; height: 26px; margin-top: 4px; }
.kn-qt .bars i { flex: 1; background: var(--c); border-radius: 3px 3px 1px 1px; opacity: .8; }
.kn-qt .ml { font-size: 11px; color: var(--muted); }
.kn-q0 { top: 0; right: 0; } .kn-q1 { bottom: 0; right: 0; } .kn-q2 { bottom: 0; left: 0; } .kn-q3 { top: 0; left: 0; }
@media (max-width: 620px) {
  .kn-dn.kn-big { display: flex; flex-direction: column; gap: 12px; }
  .kn-qs { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; pointer-events: auto; }
  .kn-qt { position: static; width: auto; }
}

/* 1.72.7: доли «Активов» плитками вокруг кольца (как у планового дохода) */
.kn-qs.flow { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; pointer-events: auto; margin-top: 12px; }
.kn-qs.flow .kn-qt { position: static; width: auto; }
.kn-qt .pbar { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.kn-qt .pbar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }

/* ===== 1.73.0: сворачиваемые графики, лента меню на телефоне, мягкие таблицы, цели ===== */
.pf-fold { margin: 0 0 16px; }
.pf-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; }
.pf-fold > summary::-webkit-details-marker { display: none; }
.pf-fold > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.pf-fold[open] > summary::before { transform: rotate(90deg); }
.pf-fold[open] > summary { margin-bottom: 12px; }
.pf-fold > summary:hover { background: var(--panel-2); }

@media (max-width: 900px) {
  .side-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 8px; border-radius: 12px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav h3 { display: none; }
  .side-nav nav { flex: none; flex-wrap: nowrap; gap: 4px; }
  .side-nav a, .side-nav .subtab { white-space: nowrap; padding: 7px 12px; border-radius: 999px; }
  .side-nav .side-tools { flex: none; display: flex; gap: 6px; }
}

table { font-variant-numeric: tabular-nums; }
td { padding: 9px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
th { border-bottom: 1px solid var(--line); }

.pf-goals { margin-bottom: 16px; }
.pf-goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 10px; }
.pf-goal { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-goal-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pf-goal-h span { font-size: 18px; font-weight: 600; color: var(--ok-fg); }
.pf-goal .pbar { height: 10px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.pf-goal .pbar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.pf-goal-edit summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.pf-goal-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 10px; }
.pf-goal-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; flex: 1 1 180px; }
.pf-goal-form small { flex-basis: 100%; }

/* ===== 1.73.1: сворачиваемые описания под блоками ===== */
.desc-fold { margin: 10px 0 0; }
.desc-fold > summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; user-select: none; padding: 4px 10px 4px 6px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--brand); background: var(--good-bg); transition: background .2s, color .2s; }
.desc-fold > summary::-webkit-details-marker { display: none; }
.desc-fold > summary::before { content: "i"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; font: italic 700 10px/1 Georgia, serif; }
.desc-fold > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s ease; }
.desc-fold[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.desc-fold > summary:hover { background: var(--panel-2); }
.desc-fold > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.desc-fold > p { margin: 8px 0 0; }
.desc-fold[open] > p { animation: descIn .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes descIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .desc-fold::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
  .desc-fold[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) { .desc-fold[open] > p { animation: none; } .desc-fold::details-content { transition: none; } }

/* 1.73.2: кнопки «Купить / Продать / Пополнить» ровно на телефоне */
@media (max-width: 760px) {
  .kn-head { display: block; }
  .kn-trade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .kn-avail { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; margin: 0 0 2px; padding: 8px 12px; border-radius: 12px; background: var(--good-bg); }
  .kn-avail small { font-size: 13px; }
  .kn-btn { text-align: center; padding: 10px 6px; }
}

/* ===== 1.75.0: доска переноса бумаг ===== */
.tb-top { margin: 4px 0 12px; }
.tb-top input { width: 100%; max-width: 360px; }
.tb-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.tb-col { background: var(--panel-2); border: 1.5px solid transparent; border-radius: 14px; padding: 10px; min-width: 0; transition: border-color .15s, background .15s; }
.tb-col.over { border-color: var(--brand); border-style: dashed; background: var(--good-bg); }
.tb-col > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 6px 10px; flex-wrap: wrap; }
.tb-col h3 { margin: 0; font-size: 15px; }
.tb-meta { font-size: 12px; color: var(--muted); }
.tb-list { display: flex; flex-direction: column; gap: 8px; min-height: 64px; }
.tb-empty { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.tb-card { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: grab; user-select: none; transition: border-color .15s, box-shadow .15s, transform .15s, opacity .15s; }
.tb-card:hover { border-color: var(--line-strong); box-shadow: 0 2px 8px var(--shadow); }
.tb-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tb-card.on { border-color: var(--brand); background: var(--good-bg); }
.tb-card.drag { opacity: .45; transform: scale(.98); }
.tb-chk { width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--line-strong); display: grid; place-items: center; background: var(--panel); transition: background .15s, border-color .15s; }
.tb-card.on .tb-chk { background: var(--brand); border-color: var(--brand); }
.tb-card.on .tb-chk::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg); }
.tb-t { min-width: 0; }
.tb-t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-t small { color: var(--muted); font-size: 12px; }
.tb-v { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

.tb-bar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; background: var(--brand-night, #0A0F15); color: #fff; padding: 10px 12px 10px 18px; border-radius: 999px; box-shadow: 0 8px 30px rgba(0, 0, 0, .28); max-width: calc(100% - 24px); animation: tbUp .22s ease both; }
.tb-bar[hidden] { display: none; }
@keyframes tbUp { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.tb-ok { background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 700; cursor: pointer; }
.tb-ok:disabled { opacity: .45; cursor: default; }
.tb-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; opacity: .85; }
.tb-panel .tb-ghost { color: var(--text); border-color: var(--line-strong); }

.tb-ov { position: fixed; inset: 0; z-index: 80; background: rgba(10, 15, 21, .45); display: flex; justify-content: flex-end; }
.tb-ov[hidden] { display: none; }
body.tb-lock { overflow: hidden; }
.tb-panel { width: min(440px, 100%); height: 100%; background: var(--panel); display: flex; flex-direction: column; transform: translateX(30px); opacity: 0; transition: transform .25s cubic-bezier(.2, .7, .2, 1), opacity .2s; box-shadow: -10px 0 40px rgba(0, 0, 0, .2); }
.tb-panel.in { transform: none; opacity: 1; }
.tb-panel > header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.tb-panel h2 { margin: 0; font-size: 18px; }
.tb-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.tb-body { flex: 1; overflow-y: auto; padding: 0 18px 12px; }
.tb-body h4 { margin: 16px 0 8px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tb-tile { text-align: left; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.tb-tile small { color: var(--muted); font-size: 12px; }
.tb-tile.on { border-color: var(--brand); background: var(--good-bg); }
.tb-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.tb-rows { display: flex; flex-direction: column; gap: 10px; }
.tb-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tb-rt b { display: block; }
.tb-rt small { color: var(--muted); font-size: 12px; }
.tb-qty { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tb-qty button { min-width: 34px; height: 34px; border: 1.5px solid var(--line-strong); background: var(--panel); border-radius: 10px; cursor: pointer; font-size: 16px; color: var(--text); }
.tb-qty input { width: 76px; height: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.tb-qty .tb-chip { font-size: 13px; padding: 0 10px; }
.tb-qty .tb-nb.on { border-color: var(--brand); background: var(--good-bg); }
.tb-note, #tbGen { width: 100%; }
.tb-prev > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.tb-prev em { font-style: normal; font-size: 12px; }
.tb-prev .up { color: var(--ok-fg); }
.tb-prev .down { color: var(--bad); }
.tb-panel > footer { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.tb-more summary { cursor: pointer; }
.tb-more ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 760px) {
  .tb-ov { align-items: flex-end; }
  .tb-panel { width: 100%; height: auto; max-height: 90vh; border-radius: 18px 18px 0 0; transform: translateY(40px); }
  .tb-bar { width: calc(100% - 24px); justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .tb-panel, .tb-card, .tb-bar { transition: none; animation: none; } }
body.tb-lock .tb-bar { display: none; }
.tb-bar .tb-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); }
.tb-panel .tb-qty button, .tb-panel .tb-tile { font-family: inherit; }
.tb-bar .tb-ok, .tb-panel .tb-ok { background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; }
.tb-panel .tb-ok:disabled { opacity: .45; }
.tb-col > header, .tb-panel > header { background: transparent; border: 0; box-shadow: none; position: static; }
.tb-panel .tb-x { background: none; border: 0; padding: 0 4px; box-shadow: none; }

/* 1.75.1: плавающий помощник не закрывает кнопки панели переноса */
body.tb-lock .sw { display: none; }
.tb-bar .tb-ok:hover, .tb-panel .tb-ok:hover:not(:disabled) { background: var(--brand); color: #fff; filter: brightness(1.12); box-shadow: 0 4px 14px rgba(30, 143, 94, .35); }
.tb-panel .tb-ok:disabled:hover { background: var(--brand); color: #fff; filter: none; box-shadow: none; }
.tb-bar .tb-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.tb-panel .tb-ghost:hover { background: var(--panel-2); color: var(--text); }
.tb-v.tb-cost { font-style: italic; opacity: .8; }

/* 1.76.0: современная форма «Новая покупка» (облигации и акции) */
.bf { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-bottom: 16px; }
.bf-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bf-block { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.bf-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.bf-n { width: 24px; height: 24px; border-radius: 50%; background: var(--good-bg); color: var(--ok-fg); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.bf-side { display: inline-flex; margin-left: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.bf-side label { margin: 0; cursor: pointer; }
.bf-side input { position: absolute; opacity: 0; pointer-events: none; }
.bf-side span { display: block; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.bf-side input:checked + span { background: var(--brand); color: #fff; }
.bf-side input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.bf-search { position: relative; }
.bf-search input.bf-q { width: 100%; max-width: none; box-sizing: border-box; font-size: 16px; padding: 13px 40px 13px 42px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--field-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237A8494' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.bf-search input.bf-q:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--good-bg); }
.bf-search input.bf-q.picked { font-weight: 600; }
.bf .bf-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin: 0; padding: 2px 8px; background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px; }
.bf .bf-clear:hover { background: var(--panel-2); color: var(--text); border: 0; }
.bf-sug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 45, .18); max-height: 340px; overflow: auto; }
.bf-sug li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.bf-sug li.on, .bf-sug li:hover { background: var(--good-bg); }
.bf-sug li.none { color: var(--muted); cursor: default; }
.bf-sug-t { display: flex; flex-direction: column; min-width: 0; }
.bf-sug-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-sug-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-badge { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.bf-status { min-height: 16px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.bf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.bf-chips > span { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.bf .bf-chip, .bf .bf-dchip { margin: 0; padding: 5px 12px; border-radius: 999px; font: 600 13px/1.3 var(--font); background: var(--panel-2); color: var(--text); border: 1px solid var(--line); cursor: pointer; }
.bf .bf-chip:hover, .bf .bf-dchip:hover { background: var(--good-bg); border-color: var(--good-line); color: var(--text); }
.bf .bf-dchip.on { background: var(--good-bg); border-color: var(--brand); color: var(--ok-fg); }
.bf-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 12px 14px; }
.bf-card:empty { display: none; }
.bf-card-t { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.bf-card-t small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.bf-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; }
.bf-kv > div { display: flex; flex-direction: column; min-width: 0; }
.bf-kv span { font-size: 12px; color: var(--muted); }
.bf-kv b { font-size: 14px; font-variant-numeric: tabular-nums; }
.bf-card .err { margin: 0; }
.bf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.bf-tile { position: relative; margin: 0; cursor: pointer; display: block; }
.bf-tile input { position: absolute; opacity: 0; pointer-events: none; }
.bf-tile-in { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel-2); transition: border-color .15s, background .15s; }
.bf-tile-in b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-tile-in small { color: var(--muted); font-size: 12px; }
.bf-tile:hover .bf-tile-in { border-color: var(--line-strong); }
.bf-tile input:checked + .bf-tile-in { border-color: var(--brand); background: var(--good-bg); box-shadow: 0 0 0 1px var(--brand) inset; }
.bf-tile input:focus-visible + .bf-tile-in { outline: 2px solid var(--brand); outline-offset: 2px; }
.bf-sub { margin: 12px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bf-sub:first-of-type { margin-top: 0; }
.bf-deal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bf-deal label.bf-l { display: block; margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bf-qty { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--field-bg); }
.bf-qty:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--good-bg); }
.bf .bf-qty button { margin: 0; border: 0; border-radius: 0; background: var(--panel-2); color: var(--text); width: 44px; font-size: 20px; line-height: 1; cursor: pointer; }
.bf .bf-qty button:hover { background: var(--good-bg); color: var(--text); border: 0; }
.bf-qty input { flex: 1; min-width: 0; max-width: none; border: 0; border-radius: 0; text-align: center; font-size: 22px; font-weight: 700; padding: 8px 4px; background: transparent; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.bf-qty input::-webkit-outer-spin-button, .bf-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bf-qty input:focus { outline: none; box-shadow: none; }
.bf-deal input[type=date], .bf-pricebox input { width: 100%; max-width: none; box-sizing: border-box; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-strong); }
.bf-deal .bf-dchips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bf-pricebox { position: relative; }
.bf-pricebox input { font-size: 20px; font-weight: 700; padding-right: 92px; font-variant-numeric: tabular-nums; }
.bf .bf-auto { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin: 0; padding: 3px 10px; font: 600 12px/1.3 var(--font); border-radius: 999px; border: 1px solid var(--good-line); background: var(--good-bg); color: var(--ok-fg); cursor: default; }
.bf .bf-auto.manual { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-line); cursor: pointer; }
.bf .bf-auto.manual:hover { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-fg); }
.bf-hint { margin-top: 6px; font-size: 12px; color: var(--muted); min-height: 15px; }
.bf-fees { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.bf-fees summary { cursor: pointer; font-size: 13.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; list-style: none; }
.bf-fees summary::-webkit-details-marker { display: none; }
.bf-fees summary::before { content: "▸"; color: var(--muted); transition: transform .2s; }
.bf-fees[open] summary::before { transform: rotate(90deg); }
.bf-fees summary em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: auto; }
.bf-fees-g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.bf-fees-g label { margin: 0 0 4px; display: block; font-size: 12.5px; color: var(--muted); }
.bf-fees-g input { width: 100%; max-width: none; box-sizing: border-box; }
.bf-sum { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.bf-sum h3 { margin: 0 0 4px; font-size: 15px; }
.bf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.bf-row span { color: var(--muted); }
.bf-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.bf-row input.bf-mini { width: 120px; max-width: none; text-align: right; border: 0; border-bottom: 1px dashed var(--line-strong); border-radius: 0; background: transparent; padding: 2px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-row input.bf-mini:focus { outline: none; border-bottom-color: var(--brand); box-shadow: none; }
.bf-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.bf-total > span { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.bf-total input.bf-big, .bf-total .bf-big { display: block; width: 100%; max-width: none; box-sizing: border-box; border: 0; border-bottom: 1.5px dashed transparent; border-radius: 0; background: transparent; padding: 2px 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--text); }
.bf-total input.bf-big:hover { border-bottom-color: var(--line-strong); }
.bf-total input.bf-big:focus { outline: none; border-bottom-color: var(--brand); box-shadow: none; }
.bf-detail { font-size: 12px; color: var(--muted); min-height: 15px; }
.bf .bf-reset { align-self: flex-start; margin: 2px 0 0; padding: 3px 10px; font-size: 12px; }
.bf-cash { font-size: 13px; color: var(--ok-fg); background: var(--good-bg); border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.bf-cash.warn { color: var(--warn-fg); background: var(--warn-bg); }
.bf .bf-go { margin: 8px 0 0; width: 100%; padding: 14px 16px; font-size: 16px; font-weight: 700; border-radius: 12px; background: var(--brand); color: #fff; border: 0; cursor: pointer; }
.bf .bf-go:hover { background: var(--brand); color: #fff; filter: brightness(1.1); box-shadow: 0 4px 14px rgba(30, 143, 94, .35); border: 0; }
.bf .bf-go.sell { background: var(--bad); }
.bf .bf-go.sell:hover { background: var(--bad); }
.bf-sumnote { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.bf-toast { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--good-bg); color: var(--ok-fg); border: 1px solid var(--good-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; animation: bfIn .35s cubic-bezier(.2, .7, .2, 1); }
.bf-toast form { margin: 0; }
.bf-toast-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.bf-toast-t { flex: 1; min-width: 160px; font-weight: 600; }
.bf-toast .bf-toast-b { margin: 0; padding: 6px 14px; border-radius: 999px; font: 600 13px/1.3 var(--font); background: transparent; color: var(--ok-fg); border: 1.5px solid var(--brand); cursor: pointer; }
.bf-toast .bf-toast-b:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.bf-toast .bf-toast-more { background: var(--brand); color: #fff; }
.bf-toast .bf-toast-more:hover { filter: brightness(1.1); }
@keyframes bfIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .bf { grid-template-columns: 1fr; }
  .bf-sum { position: static; }
  .bf-deal { grid-template-columns: 1fr 1fr; }
  .bf-deal > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .bf-block { padding: 14px; }
  .bf { padding-bottom: 14px; }
  /* кнопка «Добавить покупку» не плавает над экраном, а стоит в конце формы после всех полей (1.76.143) */
  .bf-sum .bf-go { position: static; width: 100%; }
  body.bf-page .sw { display: none; }
}
@media (max-width: 420px) { .bf-deal { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .bf-toast { animation: none; } }
.bf :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]) { max-width: none; }
.bf-row input.bf-mini { width: 120px; }

/* 1.76.4: свои окна подтверждения и ввода вместо системных */
.rv-ov { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 21, 29, .5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .16s; }
.rv-ov.in { opacity: 1; }
body.rv-lock { overflow: hidden; }
body.rv-lock .sw { display: none; }
.rv-card { width: min(420px, 100%); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); transform: translateY(10px) scale(.98); transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.rv-ov.in .rv-card { transform: none; }
.rv-t { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.rv-p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.rv-l { display: block; margin: 12px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rv-card .rv-in { width: 100%; max-width: none; box-sizing: border-box; font-size: 16px; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--field-bg); }
.rv-card .rv-in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--good-bg); outline: none; }
.rv-card .rv-in.bad { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.rv-h { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.rv-b { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.rv-card .rv-no, .rv-card .rv-ok { margin: 0; padding: 10px 20px; border-radius: 999px; font: 600 14px/1.2 var(--font); cursor: pointer; }
.rv-card .rv-no { background: var(--panel); color: var(--text); border: 1.5px solid var(--line-strong); }
.rv-card .rv-no:hover { background: var(--panel-2); border-color: var(--muted); color: var(--text); }
.rv-card .rv-ok { background: var(--brand); color: #fff; border: 1.5px solid var(--brand); }
.rv-card .rv-ok:hover { background: var(--brand); color: #fff; border-color: var(--brand); filter: brightness(1.1); box-shadow: 0 4px 14px rgba(30, 143, 94, .35); }
.rv-card.danger .rv-ok { background: var(--bad); border-color: var(--bad); }
.rv-card.danger .rv-ok:hover { background: var(--bad); border-color: var(--bad); box-shadow: 0 4px 14px rgba(181, 72, 58, .35); }
.rv-card .rv-no:focus-visible, .rv-card .rv-ok:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 480px) { .rv-ov { align-items: flex-end; } .rv-card { border-radius: 18px 18px 0 0; } .rv-b > button { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .rv-ov, .rv-card { transition: none; } }
.kn-avail .kn-split { margin-top: 2px; font-size: 11.5px; text-align: right; }
@media (max-width: 760px) { .kn-avail .kn-split { text-align: left; } }
.bf-cash .bf-move { display: block; margin: 8px 0 0; padding: 7px 14px; border-radius: 999px; font: 600 13px/1.3 var(--font); background: var(--panel); color: var(--text); border: 1.5px solid currentColor; cursor: pointer; }
.bf-cash .bf-move:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.bf-cash .bf-move:disabled { opacity: .6; cursor: wait; }

/* 1.76.6: прибыль и просадки по бумагам */
.pf-pl .pl-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; font-weight: 600; }
.pf-pl .pl-sum .bad { color: var(--bad); }
.pf-pl .pl-sum .good { color: var(--good); }
.pf-pl .pl-table tr.pl-down td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.pf-pl .pl-table .mini { font-size: 12px; font-weight: 500; opacity: .85; }
.pf-pl .pl-table td.bad, .pf-pl .pl-table td.bad .mini { color: var(--bad); }
.pf-pl .pl-table td.good, .pf-pl .pl-table td.good .mini { color: var(--good); }
.pl-link { margin-left: 12px; font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.pl-link:hover { text-decoration: underline; }
.pl-click { cursor: pointer; }
.pf-pl .pl-age{margin:.25rem 0 .75rem;font-size:.85em}

/* 1.76.7: страница «Результат» */
.perf-hero { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 16px 28px; align-items: start; }
.perf-main { display: flex; flex-direction: column; gap: 4px; }
.perf-big { font-size: 2.4rem; line-height: 1.1; }
.perf-sub { font-weight: 600; }
.perf-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; color: var(--muted); font-size: .9em; }
.perf-facts b { color: var(--text); font-weight: 600; }
.perf-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.perf-note, .perf-hero .pl-age, .perf-warn { grid-column: 1 / -1; margin: 0; }
.perf-warn { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); font-size: .9em; line-height: 1.45; }
.pf-cmp .perf-barcol { width: 28%; min-width: 90px; }
.pf-bar span.oth { background: var(--muted); opacity: .55; }
.pf-bar span.me { background: var(--brand); }
@media (max-width: 760px) { .perf-hero { grid-template-columns: 1fr; } .perf-big { font-size: 2rem; } .pf-cmp .perf-barcol { display: none; } }

/* 1.76.11: «Денежный поток» — панель */
.cf-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 32px; }
.cf-eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cf-bignum { font-size: 2.2rem; font-weight: 700; line-height: 1.1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-variant-numeric: tabular-nums; }
.cf-pct { font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.cf-pct.good { background: color-mix(in srgb, var(--brand) 14%, var(--panel)); color: var(--brand); }
.cf-pct.bad { background: var(--bad-bg); color: var(--bad); }
.cf-prog { position: relative; display: flex; height: 14px; border-radius: 7px; background: var(--panel-2); overflow: visible; margin: 14px 0 10px; }
.cf-prog span { display: block; height: 100%; }
.cf-prog span:first-child { border-radius: 7px 0 0 7px; }
.cf-prog span.paid, .cf-prog-leg i.paid, .cf-legend .paid { background: var(--brand); }
.cf-prog span.today, .cf-prog-leg i.today { background: color-mix(in srgb, var(--brand) 60%, var(--panel)); }
.cf-prog span.left, .cf-prog-leg i.left, .cf-legend .exp { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand) 45%, var(--panel)) 0 4px, color-mix(in srgb, var(--brand) 18%, var(--panel)) 4px 8px); }
.cf-prog i.goal { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 1px; }
.cf-prog-leg { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.cf-prog-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.cf-prog-leg b { color: var(--text); font-weight: 600; }
.cf-evs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cf-evs li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.cf-evs li:first-child { border-top: 0; }
.cf-evd { text-align: center; line-height: 1.1; font-size: 11px; text-transform: uppercase; color: var(--muted); background: var(--panel-2); border-radius: 8px; padding: 5px 0; }
.cf-evd b { display: block; font-size: 17px; color: var(--text); }
.cf-evn { min-width: 0; font-size: 14px; display: flex; flex-direction: column; overflow: hidden; text-overflow: ellipsis; }
.cf-evn small { color: var(--muted); font-size: 12px; }
.cf-evn em { display: inline-block; align-self: flex-start; margin-top: 2px; font-style: normal; font-size: 11px; color: var(--brand-steel); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; }
.cf-eva { font-weight: 600; font-variant-numeric: tabular-nums; }
.cf-eva.p { color: var(--brand-steel); }
.cf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.cf-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cf-tile .kpi { font-size: 1.35rem; margin: 2px 0; }
.cf-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 14px; }
.cf-controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.cf-controls input[type=number] { width: 7.5em; }
.cf-plotwrap { min-width: calc(var(--n) * 30px); padding-top: 18px; }
.cf-plot { position: relative; display: flex; gap: 4px; height: 230px; border-bottom: 1px solid var(--line-strong); }
.cf-goalline { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--text); opacity: .55; pointer-events: none; z-index: 2; }
.cf-goalline span { position: absolute; left: 0; top: -20px; font-size: 11px; background: var(--panel); padding: 0 4px; border-radius: 4px; color: var(--muted); }
.cf-plot .cf-col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 8px 8px 0 0; background: transparent; cursor: pointer; display: block; font: inherit; }
.cf-plot .cf-col:hover { background: var(--panel-2); }
.cf-plot .cf-col.on { background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.cf-plot .cf-col.hole { background: var(--bad-bg); outline: 1px dashed var(--bad); outline-offset: -1px; }
.cf-plot .cf-col.hole.on { background: color-mix(in srgb, var(--bad) 18%, var(--panel)); }
.cf-bar { position: absolute; left: 14%; right: 14%; bottom: 0; height: 100%; display: flex; flex-direction: column-reverse; }
.cf-bar span { display: block; width: 100%; }
.cf-bar .c, .cf-bar .paid { background: var(--brand); }
.cf-bar .today { background: color-mix(in srgb, var(--brand) 60%, var(--panel)); }
.cf-bar .exp { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand) 45%, var(--panel)) 0 4px, color-mix(in srgb, var(--brand) 18%, var(--panel)) 4px 8px); }
.cf-bar .p { background: var(--brand-steel); }
.cf-bar span:first-child { border-radius: 0; }
.cf-val { position: absolute; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; pointer-events: none; }
.cf-col.hole .cf-val { color: var(--bad); }
.cf-axis { display: flex; gap: 4px; }
.cf-axis span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--muted); padding-top: 6px; line-height: 1.15; }
.cf-axis span small { display: block; font-size: 10px; opacity: .8; }
.cf-axis span.cur { color: var(--text); font-weight: 700; }
.cf-legend .paid, .cf-legend .exp { }
.cf-detail { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.cf-d-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.cf-d-head b { font-size: 1.05rem; }
.cf-d-sum { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cf-d-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.cf-d-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(60px, 1fr) minmax(110px, auto); gap: 12px; align-items: center; font-size: 14px; }
.cf-d-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-d-bar { display: flex; height: 8px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.cf-d-bar .c { background: var(--brand); } .cf-d-bar .p { background: var(--brand-steel); }
.cf-d-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 760px) {
  .cf-hero { grid-template-columns: 1fr; }
  .cf-bignum { font-size: 1.8rem; }
  .cf-d-row { grid-template-columns: 1fr auto; }
  .cf-d-bar { display: none; }
}

/* 1.76.12: «Деньги» — остатки как у брокера */
.cash-all-rows { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.cash-all-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(110px, 1fr) minmax(150px, 1fr); gap: 12px; align-items: center; }
.cash-all-row input[type=text] { width: 100%; max-width: none; }
@media (max-width: 640px) { .cash-all-row { grid-template-columns: 1fr 1fr; } .cash-all-row input[type=text] { grid-column: 1 / -1; } }

/* 1.76.13: «Деньги» — смарт-страница */
.cash-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 32px; }
.cash-hero-sub { margin: 6px 0 14px; }
.cash-split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.cash-split span { display: block; height: 100%; }
.cash-split-leg { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cash-split-leg li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.cash-split-leg i, .cash-own-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.cash-split-leg b { font-variant-numeric: tabular-nums; }
.cash-hero-side { display: flex; flex-direction: column; gap: 10px; }
.cash-chip { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; }
.cash-chip b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cash-chip small { flex-basis: 100%; color: var(--brand); font-weight: 600; }
.cash-chip.warn { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); }
.cash-chip.is-ok { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.cash-chip.is-ok b { color: var(--brand); }
.cash-all > summary { cursor: pointer; list-style: none; }
.cash-all > summary::-webkit-details-marker { display: none; }
.cash-all > summary::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--brand); transition: transform .15s; }
.cash-all[open] > summary::before { transform: rotate(90deg); }
.cash-acc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cash-acc-head h3 { margin: 0; }
.cash-acc-free { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.cash-acc-free b { font-size: 1.9rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cash-acc-free b.bad { color: var(--bad); } .cash-acc-free b.good { color: var(--text); }
.cash-own { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--panel-2); margin: 10px 0 8px; gap: 2px; }
.cash-own span { display: block; height: 100%; }
.cash-own .b, .cash-own-leg i.b { background: var(--muted); opacity: .45; }
.cash-own-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.cash-own-leg i { margin-right: 6px; }
.cash-own-leg .tot { margin-left: auto; color: var(--text); font-weight: 600; }
.cash-since { font-size: 12px; margin: 8px 0 0; }
.cash-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cash-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.cash-btn:hover { border-color: var(--brand); color: var(--brand); }
.cash-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cash-pane { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.cash-pane[hidden] { display: none; }
.cash-pane-t { font-weight: 600; margin-bottom: 8px; }
.cash-confirm-all { margin: 0 0 12px; }
.cash-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.cash-filter button { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.cash-filter button.on { background: var(--text); border-color: var(--text); color: var(--panel); }
.cash-jr tr[hidden] { display: none; }
@media (max-width: 760px) { .cash-hero { grid-template-columns: 1fr; } .cash-acc-free b { font-size: 1.6rem; } }
.cash-btns .cash-btn.on, .cash-btns .cash-btn.on:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 1.76.15: «Проверка данных» */
.audit-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; }
.audit-head h2 { margin: 0 0 6px; }
.audit-intro .pl-age { margin: 6px 0 0; }
.audit-sum { display: grid; grid-template-columns: repeat(3, 92px); gap: 10px; align-items: stretch; }
.audit-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.audit-stat b { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.audit-stat span { font-size: 12px; color: var(--muted); }
.audit-stat.s-ok b { color: var(--brand); } .audit-stat.s-warn b { color: #b07b12; } .audit-stat.s-bad b { color: var(--bad); }
.audit-sum .audit-stat { box-sizing: border-box; width: 100%; min-height: 72px; margin: 0; }
.audit-again { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 10px; border: 1px solid var(--brand); color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: none; background: var(--panel); }
.audit-again:hover { background: var(--brand); color: #fff; }
@media (max-width: 700px) { .audit-head { grid-template-columns: 1fr; } .audit-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.audit-g { margin: 22px 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.audit-list { display: flex; flex-direction: column; gap: 10px; }
.audit-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; margin: 0; border-left: 4px solid var(--line-strong); }
.audit-item.a-ok { border-left-color: var(--brand); } .audit-item.a-warn { border-left-color: #d9a21b; } .audit-item.a-bad { border-left-color: var(--bad); }
.audit-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--muted); }
.audit-item.a-ok .audit-ic { background: var(--brand); } .audit-item.a-warn .audit-ic { background: #d9a21b; } .audit-item.a-bad .audit-ic { background: var(--bad); }
.audit-t { font-weight: 600; }
.audit-body p { margin: 4px 0 8px; }
.audit-rows { border-collapse: collapse; font-size: 14px; margin: 4px 0 10px; }
.audit-rows td { padding: 3px 18px 3px 0; font-variant-numeric: tabular-nums; }
.audit-rows td:first-child { color: var(--muted); }
.audit-act { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.audit-act form { margin: 0; }
.audit-act button, .audit-act .btn-sm { height: 36px; box-sizing: border-box; display: inline-flex; align-items: center; margin: 0; padding: 0 14px; }
tr.pos-gone td { background: color-mix(in srgb, var(--bad) 6%, var(--panel)); }
tr.pos-gone td:first-child { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bad) 35%, transparent); }

/* 1.76.19: «Проданные» */
.sd-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 20px 32px; align-items: start; }
.sd-sub { margin: 6px 0 12px; }
.sd-win { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.sd-win span { display: block; height: 100%; }
.sd-win .w, .sd-win-leg i.w { background: var(--brand); } .sd-win .l, .sd-win-leg i.l { background: var(--bad); }
.sd-win-leg { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.sd-win-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.sd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sd-tiles .cf-tile .kpi { font-size: 1.2rem; }
.sd-tiles .cf-tile .mini { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.sd-table th, .sd-table td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sd-table th.num, .sd-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sd-exp { width: 26px; height: 26px; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 8px; cursor: pointer; color: var(--muted); padding: 0; }
.sd-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.sd-pill.good { background: color-mix(in srgb, var(--brand) 13%, var(--panel)); color: var(--brand); }
.sd-pill.bad { background: var(--bad-bg); color: var(--bad); }
.sd-res { min-width: 170px; }
.sd-bar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--panel-2); overflow: hidden; }
.sd-bar i { display: block; height: 100%; margin-left: auto; border-radius: 2px; }
.sd-bar i.good { background: var(--brand); } .sd-bar i.bad { background: var(--bad); }
.sd-lots[hidden] { display: none; }
.sd-lots > td { background: var(--panel-2); padding: 8px 12px 12px; }
.sd-subtbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.sd-subtbl th, .sd-subtbl td { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.sd-subtbl th.num, .sd-subtbl td.num { text-align: right; }
.sd-table tfoot td { border-top: 2px solid var(--line-strong); border-bottom: 0; }
@media (max-width: 760px) { .sd-hero { grid-template-columns: 1fr; } }

/* 1.76.19: «Ребалансировка» */
.rb-now { margin: 12px 0; }
.rb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.rb-card { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.rb-card:hover { border-color: var(--brand); }
.rb-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 22%, transparent); background: color-mix(in srgb, var(--brand) 5%, var(--panel)); }
.rb-t { font-weight: 700; }
.rb-m { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.rb-m span { display: flex; justify-content: space-between; gap: 10px; }
.rb-m b { font-variant-numeric: tabular-nums; color: var(--text); }
.rb-m b.good { color: var(--brand); } .rb-m b.bad { color: var(--bad); }
.rb-s { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.rb-mode { margin: 0 0 12px; }
.rb-act { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.rb-act.bad { background: var(--bad-bg); color: var(--bad); }
.rb-act.good { background: color-mix(in srgb, var(--brand) 13%, var(--panel)); color: var(--brand); }
tr.rb-sell td { background: color-mix(in srgb, var(--bad) 4%, var(--panel)); }
tr.rb-buy td { background: color-mix(in srgb, var(--brand) 4%, var(--panel)); }
.rb-ba { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rb-ba i { font-style: normal; color: var(--muted); }
.rb-ba .kpi { font-size: 1.25rem; }

/* ===== Школа (1.76.21) ===== */
.sch-wrap{max-width:920px}
.sch-head{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;justify-content:space-between;margin-bottom:8px}
.sch-head h2{margin:0}
.sch-tabs{display:inline-flex;gap:4px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--panel-2)}
.sch-tabs a{padding:5px 14px;border-radius:8px;color:var(--muted);text-decoration:none;font-weight:600}
.sch-tabs a.on{background:var(--panel);color:var(--text);box-shadow:0 0 0 1px var(--line-strong)}
.sch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px;margin-top:12px}
.sch-card{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);text-decoration:none}
.sch-card:hover{border-color:var(--brand)}
.sch-card.done{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))}
.sch-num{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--brand);font-weight:700}
.sch-ct{display:flex;flex-direction:column;gap:4px;min-width:0}
.sch-min{font-size:12px;color:var(--muted)}
.sch-ok{color:var(--brand)}
.sch-soon,.sch-note{margin-top:14px;font-size:13px}
.sch-meta{margin-bottom:6px}
.sch-lead{font-size:16px;margin:6px 0 10px}
.sch-body{max-width:70ch}
.sch-body h3{margin:18px 0 6px}
.sch-body ul{padding-left:20px}
.sch-body li{margin:4px 0}
.sch-calc{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;padding:14px;margin:10px 0;border:1px solid var(--line);border-radius:12px;background:var(--panel-2)}
.sch-calc label{display:flex;flex-direction:column;justify-content:flex-end;gap:4px;font-size:12px;color:var(--muted)}
.sch-calc input[type=number]{width:100%;max-width:none}
.sch-out{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}
.sch-out>div{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:10px;background:var(--panel);border:1px solid var(--line)}
.sch-out span{font-size:12px;color:var(--muted)}
.sch-out b{font-size:17px;font-variant-numeric:tabular-nums}
.sch-tbl{overflow-x:auto;margin:10px 0}
.sch-tbl table{min-width:560px}
.sch-links{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0}
.sch-chip{padding:4px 12px;border:1px solid var(--line-strong);border-radius:999px;color:var(--text);text-decoration:none;font-size:13px}
.sch-chip:hover{border-color:var(--brand);color:var(--brand)}
.sch-quiz{margin:14px 0;padding:12px 14px;border:1px dashed var(--line-strong);border-radius:12px}
.sch-pager{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between;margin-top:18px}
.sch-pager a{text-decoration:none;color:var(--brand);font-weight:600}
.sch-done{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:13px}
.sch-gloss{margin:12px 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:8px 24px}
.sch-term{padding:8px 0;border-bottom:1px solid var(--line)}
.sch-term[hidden]{display:none}
.sch-term dt{font-weight:700}
.sch-term dd{margin:2px 0 0;color:var(--muted)}

/* ===== Лента выплат (1.76.23) ===== */
.tk{display:flex;align-items:center;gap:10px;min-height:36px;padding:0 10px 0 14px;background:color-mix(in srgb,var(--brand) 9%,var(--panel));border-bottom:1px solid color-mix(in srgb,var(--brand) 25%,var(--line));overflow:hidden}
.tk[hidden],.tk-mini[hidden]{display:none}
.tk-lab{flex:none;display:flex;align-items:center;gap:7px;padding:4px 12px 4px 9px;border-radius:999px;background:var(--brand);color:#fff;text-decoration:none;font-size:12.5px;white-space:nowrap}
.tk-lab b{font-weight:700;font-variant-numeric:tabular-nums}
.tk-lab svg{flex:none}
.tk-view{flex:1;min-width:0;overflow:hidden;position:relative;-webkit-mask-image:linear-gradient(90deg,transparent,#000 22px,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(90deg,transparent,#000 22px,#000 calc(100% - 22px),transparent)}
.tk-track{display:flex;width:max-content}
.tk-set{display:flex;align-items:center;gap:10px;padding:0 5px}
.tk-track.run{animation:tkmove var(--tk-dur,30s) linear infinite}
.tk-view:hover .tk-track.run,.tk-view:focus-within .tk-track.run{animation-play-state:paused}
@keyframes tkmove{to{transform:translateX(-50%)}}
.tk-pill{display:inline-flex;align-items:center;gap:8px;padding:3px 12px;border:1px solid var(--line);border-radius:999px;background:var(--panel);font-size:13px;white-space:nowrap}
.tk-pill.now{border-color:color-mix(in srgb,var(--brand) 55%,var(--line))}
.tk-when{color:var(--muted);font-size:12px}
.tk-pill.now .tk-when{color:var(--brand);font-weight:700}
.tk-pill b{color:var(--brand);font-variant-numeric:tabular-nums}
.tk-pill em{font-style:normal;font-size:11px;color:var(--muted)}
.tk .tk-b{flex:none;width:26px;height:26px;min-width:0;padding:0;margin:0;border:0;box-shadow:none;border-radius:50%;background:transparent;color:var(--muted);font-size:16px;line-height:1;cursor:pointer}
.tk .tk-b:hover{background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--text)}
button.tk-mini{display:block;width:100%;min-width:0;height:8px;padding:0;margin:0;border:0;border-radius:0;box-shadow:none;background:color-mix(in srgb,var(--brand) 45%,var(--panel));cursor:pointer}
button.tk-mini:hover{height:12px;background:color-mix(in srgb,var(--brand) 65%,var(--panel))}
button.tk-mini[hidden]{display:none}
@media (prefers-reduced-motion:reduce){.tk-track.run{animation:none}.tk-view{overflow-x:auto}}
@media (max-width:640px){.tk{min-height:32px;padding-left:8px}.tk-lab span{display:none}.tk-pill{font-size:12px}}
.tk-cta{flex:none;display:inline-flex;align-items:center;gap:4px;padding:4px 12px;border-radius:999px;background:var(--warn-bg,#fff3d6);border:1px solid color-mix(in srgb,#d98a00 55%,var(--line));color:var(--warn,#8a5a00);font-size:12.5px;font-weight:600;text-decoration:none;white-space:nowrap}
.tk-cta:hover{background:color-mix(in srgb,#d98a00 22%,var(--panel))}
.tk-cta-s{font-weight:500;font-variant-numeric:tabular-nums}
.tk-cta::after{content:"→"}
@media (max-width:640px){.tk-cta-s{display:none}}

/* ===== Тонкая полоса уведомлений (1.76.25–26): одна на все сообщения ===== */
.ns{display:flex;align-items:flex-start;gap:6px;margin:0 0 10px;padding:0 6px 0 0;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);font-size:13px;overflow:hidden}
.ns[hidden],button.ns-mini[hidden]{display:none}
.ns{cursor:pointer}
.ns a,.ns button,.ns form{cursor:auto}
.ns a,.ns .ns-ok,.ns .ns-f{cursor:pointer}
.ns-rows{flex:1;min-width:0}
.ns-row{display:flex;align-items:center;gap:12px;min-height:34px;padding:4px 6px 4px 14px;border-left:3px solid transparent}
.ns-row+.ns-row{border-top:1px solid var(--line)}
.ns-row.ns-accent{border-left-color:var(--brand)}
.ns-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ns-sub{color:var(--muted)}
.ns-a{flex:none;display:flex;align-items:center;gap:12px}
.ns-a a{font-weight:600;white-space:nowrap}
.ns-form{margin:0}
.ns .ns-ok{margin:0;padding:2px 10px;min-width:0;font-size:12px;line-height:1.5;border-radius:999px;border:1px solid var(--line-strong);background:transparent;color:var(--muted);box-shadow:none;cursor:pointer}
.ns .ns-ok:hover{color:var(--text);border-color:var(--muted)}
.ns .ns-f{flex:none;width:26px;height:26px;min-width:0;padding:0;margin:4px 0 0;border:0;box-shadow:none;border-radius:50%;background:transparent;color:var(--muted);font-size:16px;line-height:1;cursor:pointer}
.ns .ns-f:hover{background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--text)}
button.ns-mini{display:block;width:100%;min-width:0;height:3px;margin:0 0 10px;padding:0;border:0;border-radius:2px;box-shadow:none;background:color-mix(in srgb,#f5a04a 52%,var(--panel));cursor:pointer;transition:filter .15s}
button.ns-mini:hover{filter:brightness(1.12) saturate(1.2)}
@media (max-width:640px){.ns-row{padding-left:10px;gap:8px;font-size:12.5px}.ns-sub{display:none}}

/* Кнопки свернуть/убрать (1.76.28): тонкие значки вместо текстовых символов */
.tk .tk-b,.ns .ns-f{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:0;border-radius:50%;border:1px solid transparent;color:var(--muted);transition:background .15s,color .15s,border-color .15s}
.tk .tk-b:hover,.ns .ns-f:hover{background:color-mix(in srgb,var(--brand) 12%,transparent);border-color:color-mix(in srgb,var(--brand) 35%,transparent);color:var(--brand)}
.ns .ns-f{margin:5px 0 0}
/* Свёрнутая линия уведомлений поднята вплотную к ленте выплат (1.76.29): гасим верхний отступ main */
.tk ~ main > button.ns-mini:first-child,.tk-mini ~ main > button.ns-mini:first-child{margin-top:-22px;margin-bottom:16px}

/* Деньги: кольца вместо полос */
.cash-hero { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: start; }
.cash-rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px 28px; }
.cash-ring-box { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.cash-ring-box .cash-split-leg { width: 100%; margin-top: 4px; }
.cash-ring { position: relative; flex: none; max-width: 100%; }
.cash-ring svg { width: 100%; height: 100%; display: block; }
.cash-ring circle { transition: stroke-width .15s; }
.cash-ring circle:hover { stroke-width: 14; }
.cash-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 16%; }
.cash-ring-c span { font-size: 11px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.cash-ring-c b { font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.cash-acc .cash-ring-c b { font-size: 12.5px; }
.cash-acc-body { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 4px; }
.cash-acc-nums { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 150px; }
.cash-acc-nums b { font-size: 1.7rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cash-acc-nums b.bad { color: var(--bad); } .cash-acc-nums b.good { color: var(--text); }
.cash-acc-nums .cash-own-leg { flex-direction: column; gap: 4px; margin-top: 6px; }
@media (max-width: 860px) { .cash-hero { grid-template-columns: minmax(0, 1fr); } }
.pf-pl .pl-sum-all { margin: -4px 0 12px; font-size: 13px; }

/* Заполнение формы покупки по скриншоту */
.bf-shot { margin-top: 12px; padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.bf-shot.drag { border-color: var(--brand); background: var(--good-bg); }
.bf-shot .shot-btn { margin: 0; }
.bf-shot .shot-or { font-size: 12.5px; color: var(--muted); }
.bf-shot .shot-msg { flex-basis: 100%; font-size: 13px; color: var(--muted); min-height: 0; }
.bf-shot .shot-msg:empty { display: none; }
.bf-shot .shot-msg.bad { color: var(--bad); }
.bf-shot .shot-res { flex-basis: 100%; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 13.5px; }
.bf-shot .shot-res[hidden] { display: none; }
.shot-t { font-weight: 600; margin-bottom: 6px; }
.shot-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0; }
.shot-dl dt { color: var(--muted); } .shot-dl dd { margin: 0; font-variant-numeric: tabular-nums; }
.shot-warn { margin: 8px 0 0; padding-left: 18px; color: var(--bad); }
.shot-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.shot-cands { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.shot-cands > span { font-size: 12.5px; color: var(--muted); }

.shot-tbl { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.shot-tbl th, .shot-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.shot-tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shot-tbl select, .shot-tbl input.shot-isin { max-width: 260px; width: 100%; margin: 0; }
.shot-st { font-size: 12.5px; color: var(--muted); } .shot-st.bad { color: var(--bad); } .shot-st.good { color: var(--good); }
.bf-shot button.shot-go { margin: 12px 0 0; }

.bf-dup { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.bf-dup input { width: auto; margin: 0 6px 0 0; vertical-align: -2px; }
.shot-tbl .shot-nm { font-size: 12px; color: var(--bad); margin-bottom: 4px; }
.shot-tbl input.shot-isin { min-width: 120px; padding: 6px 8px; }
.bf-main, .bf-block, .bf-shot { min-width: 0; }
.bf-shot .shot-res { min-width: 0; max-width: 100%; box-sizing: border-box; }
.bf-shot .wrap-x { max-width: 100%; overflow-x: auto; }
.shot-tbl { min-width: 0; font-size: 12.5px; }
.shot-tbl th, .shot-tbl td { padding: 5px 5px; }
.shot-tbl th { white-space: normal; line-height: 1.2; }
.shot-tbl td.shot-st { min-width: 60px; max-width: 150px; }
.shot-tbl td.num { padding-left: 2px; padding-right: 8px; }
.shot-tbl input.shot-in { margin: 0; padding: 4px 5px; font-size: 12.5px; border-radius: 6px; box-sizing: border-box; text-align: right; max-width: none; }
.shot-tbl input.shot-in.q { width: 46px; } .shot-tbl input.shot-in.p { width: 70px; } .shot-tbl input.shot-in.k { width: 74px; }
.shot-tbl input.shot-in.f { width: 62px; display: block; } .shot-tbl input.shot-in.f + input.shot-in.f { margin-top: 3px; }
.shot-tbl input.shot-in.d { width: 128px; text-align: left; }
.shot-tbl .shot-sell { font-size: 11.5px; color: var(--warn, #b45309); font-weight: 600; }
.te-link { font-size: 12.5px; white-space: nowrap; }


/* ===== Общий поиск (1.76.51) ===== */
.hdr-search{margin:0}
.hdr-search input{width:170px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--text);font:inherit;font-size:13px}
.hdr-search input:focus{outline:none;border-color:var(--brand);width:230px}
.srch-form{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.srch-form input[type=search]{flex:1 1 280px;min-width:0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);font:inherit}
.srch-links{margin:6px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:6px}
@media (max-width:700px){.hdr-search{flex:1 1 100%;order:5}.hdr-search input,.hdr-search input:focus{width:100%;box-sizing:border-box}}

/* 1.76.53: бумага из портфеля — звёздочка избранного зелёная */
.fav-btn.auto, .fav-btn.on.auto, .fav-btn.auto:hover { color: var(--good); opacity: 1; }
.fav-btn--lbl.auto .fav-ic, .fav-btn--lbl.on.auto .fav-ic { color: var(--good); }

/* ===== 1.76.54: единые заголовки таблиц выпусков (скринер, портфель, карточка, избранное, поиск) ===== */
.scr-table thead th { vertical-align: middle; white-space: normal; line-height: 1.2; position: relative; height: 44px;
  padding: 8px 16px 8px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  background: var(--panel-2); border-bottom: 2px solid var(--line-strong); word-break: normal; overflow-wrap: normal; }
.scr-table thead th.num { text-align: right; }
.scr-table thead th.rn { padding: 8px 4px; }
.scr-table thead th button.th, .scr-table thead th a.th { display: inline; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.scr-table thead th button.th::after, .scr-table thead th a.th::after { content: "↕"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 10px; opacity: .35; }
.scr-table thead th.s-asc button.th::after, .scr-table thead th.s-asc a.th::after { content: "↑"; opacity: 1; color: var(--brand); }
.scr-table thead th.s-desc button.th::after, .scr-table thead th.s-desc a.th::after { content: "↓"; opacity: 1; color: var(--brand); }
.scr-table thead th.s-asc, .scr-table thead th.s-desc { color: var(--text); }
.scr-table thead th button.th:hover { color: var(--text); }
.scr-table thead th.num { padding: 8px 4px 8px 14px; letter-spacing: .03em; }
.scr-table thead th.num button.th::after, .scr-table thead th.num a.th::after { right: auto; left: 4px; }
.scr-table thead th.rn { padding: 8px 4px; }

/* Обзор (overview.php): короткая сводка в стиле брокерских приложений. Цвета — токены темы. */
.ov-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; align-items: start; }
.ov { min-width: 0; }
.ov-aside { display: none; }
@media (min-width: 1100px) {
  .ov-wrap { grid-template-columns: minmax(0, 1fr) 340px; }
  .ov-aside { display: block; padding-top: 12px; }
  .ov-aside .card { margin: 0 0 12px; padding-top: 14px; }
  .ov-aside .card h3 { margin: 0 0 6px; }
  .ov-tabs a.ov-t-m { display: none; }
}
.ov-hero { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px 16px; margin: 12px 0; }
.ov-lbl { color: var(--muted); font-size: 13px; }
.ov-total { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ov-pl { font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ov-sum { margin: 10px 0 0; line-height: 1.45; }
.ov-note { margin: 8px 0 0; }
.ov-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 12px; }
.ov-act { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; color: var(--text); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.ov-act:hover { border-color: var(--line-strong); }
.ov-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); display: flex; align-items: center; justify-content: center; color: var(--brand); }
.ov-tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel-2); border-radius: 14px; margin-bottom: 12px; }
.ov-tabs a { flex: 1 1 0; text-align: center; padding: 8px 4px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13px; text-decoration: none; }
.ov-tabs a.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px var(--shadow); }
.ov-body { padding: 8px 18px 14px; }
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ov-list li:last-child { border-bottom: 0; }
.ov-l { min-width: 0; flex: 1 1 auto; }
.ov-l .muted { margin-top: 2px; }
.ov-r { display: flex; flex-direction: column; align-items: flex-end; flex: none; font-variant-numeric: tabular-nums; }
.ov-r span { font-size: 12.5px; margin-top: 2px; }
.ov-date { width: 40px; text-align: center; flex: none; line-height: 1.1; }
.ov-date b { display: block; font-size: 18px; }
.ov-date span { font-size: 11px; color: var(--muted); }
.ov-more { margin: 10px 0 4px; }
.ov-struct { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.ov-ring { position: relative; width: 150px; height: 150px; flex: none; }
.ov-ring-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ov-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 180px; display: flex; flex-direction: column; gap: 10px; }
.ov-legend li { display: flex; align-items: center; gap: 8px; }
.ov-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ov-legend span { flex: 1 1 auto; }
.ov-legend b { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .ov-total { font-size: 28px; } .ov-body { padding: 6px 12px 12px; } }

/* Операции (operations.php): лента по датам и фильтры-таблетки. */
.op-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.op-pills a { padding: 6px 13px; border-radius: 999px; background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.op-pills a:hover { border-color: var(--line-strong); }
.op-pills a.on { background: var(--text); color: var(--bg); }
.op-acc a { font-weight: 500; }
.op-day { margin: 18px 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.op-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.op-tag { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--panel-2); color: var(--text); }
.op-tag.op-buy { background: var(--info-bg); color: var(--info-fg); }
.op-tag.op-sell { background: var(--warn-bg); color: var(--warn-fg); }
.op-tag.op-in { background: var(--good-bg); color: var(--good); }
.op-tag.op-out { background: var(--bad-bg); color: var(--bad); }
.op-t { min-width: 0; flex: 1 1 auto; }
.op-t .muted { margin-top: 2px; }
.op-a { flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.op-a .te-link { font-size: 12px; font-weight: 400; }

/* Меню из пяти пунктов (lib/lib.php): «Ещё» справа, нижняя панель на телефоне, вкладки «Аналитика», страница more.php. */
.dark-strip details.dd.dd-more > .dd-panel { left: auto; right: 0; }
.bnav { display: none; }
.ana-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin: 0 0 8px; scrollbar-width: thin; }
.ana-tabs a { flex: none; padding: 6px 13px; border-radius: 999px; background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; border: 1px solid transparent; }
.ana-tabs a:hover { border-color: var(--line-strong); }
.ana-tabs a.on { background: var(--text); color: var(--bg); }
.more-h { margin: 18px 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.more-list a { display: block; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); color: var(--text); text-decoration: none; font-weight: 500; }
.more-list a:hover { background: var(--good-bg); }
.more-out { margin: 18px 0 4px; }
@media (max-width: 700px) {
  .dark-strip { display: none; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--brand-night); border-top: 1px solid #1B2735; padding: 0 6px env(safe-area-inset-bottom, 0px); }
  .bnav a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 62px; color: #8A94A3; font-size: 11px; font-weight: 500; text-decoration: none; }
  .bnav a.on { color: #ffffff; }
  .bnav a.on svg { color: var(--brand); }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

/* Рынок (markets.php): поиск, плитки разделов, лидеры оборота. */
.mk-search { display: flex; gap: 8px; margin: 12px 0; }
.mk-search input { flex: 1 1 auto; min-width: 0; }
.mk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.mk-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; color: var(--text); text-decoration: none; min-height: 84px; box-sizing: border-box; }
.mk-tile:hover { border-color: var(--line-strong); }
.mk-tile .muted { margin: 0; }
@media (max-width: 560px) { .mk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Телефон: кнопка поддержки над нижней панелью и компактная шапка (версия скрыта — она видна внизу страницы и в «Ещё»). */
@media (max-width: 700px) {
  .sw { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); right: 10px; }
  .sw button.sw-fab { width: 44px; height: 44px; }
  .sw button.sw-fab svg { width: 28px; height: 28px; }
  .sw-panel { bottom: 56px; }
  header .ver { display: none; }
  header .brandrow { flex-wrap: nowrap; align-items: center; }
  header .brand { flex: none; }
  .hdr-right { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
  .hdr-right form { margin: 0 !important; }
  button.hdr-theme { font-size: 11px; }
}

/* Телефон: левая лента «Личные данные» скрыта (все разделы есть в «Ещё»); настройки портфеля остаются. */
@media (max-width: 700px) {
  .side-nav h3, .side-nav .side-tabs, .side-nav .side-extra { display: none; }
  .side-nav { padding: 0; border: 0; background: none; position: static; }
}

/* Избранное: акции списком (1.76.72) */
.fav-list { padding: 4px 16px; }
.fav-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 150px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fav-row:last-child { border-bottom: 0; }
.fav-row-main { min-width: 0; }
.fav-row-num { text-align: right; font-variant-numeric: tabular-nums; }
.fav-row-ext { font-size: 13px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 2px; }
.fav-row .up { color: var(--good); }
.fav-row .dn { color: var(--bad); }
@media (max-width: 700px) {
  .fav-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .fav-row-ext { display: none; }
}

/* «Счета» и «Деньги» в общем стиле (1.76.73) */
.acc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.acc-item, .acc-item:last-child { padding: 16px; border: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); }
.acc-name { font-size: 16px; }
.acc-tag { border-radius: 999px; background: var(--panel); }
.cash-hero, .cash-all, .cash-grid .card { border-radius: 20px; }
.cash-btn { background: var(--panel-2); border-color: transparent; font-weight: 600; }
.cash-btn:hover { border-color: var(--line-strong); }
.cash-filter button { border-radius: 999px; }
@media (max-width: 700px) { .acc-list { grid-template-columns: minmax(0, 1fr); } }

/* Форма «Открыть счёт»: колонка ограниченной ширины, кнопка отдельной строкой (1.76.74) */
form.auth-form:has(input[name="action"][value="add_account"]) { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
form.auth-form:has(input[name="action"][value="add_account"]) select,
form.auth-form:has(input[name="action"][value="add_account"]) input[type="text"],
form.auth-form:has(input[name="action"][value="add_account"]) textarea { width: 100%; box-sizing: border-box; }
form.auth-form:has(input[name="action"][value="add_account"]) button[type="submit"] { align-self: flex-start; margin-top: 8px; }

/* «Налоги» и «Прибыль по бумагам» в общем стиле (1.76.75) */
.pf-pl .pl-table { width: 100%; font-size: 13px; }
.pf-pl .pl-table th, .pf-pl .pl-table td { padding: 9px 7px; }
.pf-pl .pl-table th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.pf-pl .pl-table td:nth-child(8) { width: 84px; min-width: 70px; }
.pf-pl .pl-table td:nth-child(8) > * { max-width: 84px; }
.pf-pl .pl-sum { font-size: 15px; }
.pf-pl.card, .card.pf-pl { border-radius: 20px; }
form.auth-form:has(input[name="carry"]) { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
form.auth-form:has(input[name="carry"]) input[type="text"] { width: 100%; box-sizing: border-box; }
form.auth-form:has(input[name="carry"]) button[type="submit"] { align-self: flex-start; margin-top: 8px; }
.card .grid > div > .kpi { font-size: 24px; letter-spacing: -0.01em; }

/* «Статистика»: показатели в общем стиле (1.76.76) */
.stat-table { width: 100%; font-size: 14px; }
.stat-table td, .stat-table th { padding: 10px 12px; }
.stat-table td.val { font-weight: 600; white-space: nowrap; border-radius: 8px; }
.stat-table tr.stat-grp th { border-radius: 0; font-size: 11.5px; padding-top: 14px; }
.stat-table td.muted { font-size: 13px; }
.cf-evn small { display: block; }
@media (max-width: 700px) {
  .stat-table td.muted { display: none; }
  .stat-table th:nth-child(3) { display: none; }
  .stat-table tr.stat-grp th { display: table-cell; }
}

/* Телефон: графики без пустого места снизу, мелкие KPI в две колонки (1.76.80) */
@media (max-width: 700px) {
  .pf-curve-box { min-height: 0; padding-bottom: 8px; background: var(--panel-2); }
  .pf-curve-box canvas { max-height: 230px; }
  .card > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .card > .grid .kpi { font-size: 20px; }
}

/* Публичная страница портфеля (p.php) и её настройки (share.php) */
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pub-brand .logo { display: inline-block; width: 150px; }
.pub-top-r { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.pub-reg { padding: 7px 14px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
.pub-main { max-width: 960px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.pub-hero h1 { margin: 6px 0 4px; font-size: 26px; text-wrap: balance; }
.pub-badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--good-bg); color: var(--good); }
.pub-desc { margin: 0 0 4px; }
.pub-meta { margin: 0; }
.pub-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pub-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.pub-tile span { font-size: 12px; color: var(--muted); }
.pub-tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pub-table td small { display: block; }
.pub-share { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--line); vertical-align: middle; overflow: hidden; }
.pub-share i { display: block; height: 100%; background: var(--accent); }
.pub-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pub-cta[hidden] { display: none; }
.pub-cta p { margin: 4px 0 0; }
.pub-cta-b { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pub-disc { font-size: 12px; }
.pub-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.pub-link input { flex: 1 1 280px; min-width: 0; }
.pub-set { margin-bottom: 14px; }
.tag-ok { background: var(--good-bg); color: var(--good); }
.pub-note { margin: 0; text-align: center; font-size: 12px; }
@media (max-width: 860px) { .pub .kn-rings { grid-template-columns: 1fr; } }
.pub-share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; }
.pub .pf-curve-box { height: 220px; min-height: 0; }
.pub-tiles-s { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 6px 0 10px; }

/* Логотип: без подсветки при касании/клике и без выделения как текста (овал вокруг надписи) */
header .brand, .login-brand, .pub-brand { -webkit-tap-highlight-color: transparent; }
.logo, .logo svg { -webkit-user-select: none; user-select: none; }
header .brand:focus { outline: none; }
header .brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 8px; }

/* ===== 1.76.89: шапка — поиск рядом с логотипом, тема значком, режим пользователя в «Админке» ===== */
button.hdr-ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; flex: none; }
button.hdr-ico svg { display: block; }
.hdr-search input { width: 150px; }
.hdr-search input:focus { width: 200px; }
button.role-btn { margin: 0; white-space: nowrap; }
.role-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.role-card p { margin: 4px 0 0; }
@media (max-width: 700px) {
  header .brandrow { gap: 8px; }
  header .hdr-right { flex-wrap: nowrap; min-width: 0; gap: 8px; }
  header .hdr-search { flex: 1 1 auto; order: 0; min-width: 0; max-width: 170px; margin-left: auto; }
  header .hdr-search input, header .hdr-search input:focus { width: 100%; box-sizing: border-box; }
}

/* ===== 1.76.89: «Доступно для покупки» и «Ближайшая выплата» ===== */
.kn-avail { align-items: stretch; gap: 6px; margin-right: 10px; }
.kn-av-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kn-av-top b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kn-avail .kn-split { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 0; }
.kn-sp { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); font-size: 12px; white-space: nowrap; }
.kn-sp i { font-style: normal; color: var(--muted); }
.kn-sp b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .kn-avail { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; margin: 0 0 4px; }
  .kn-avail .kn-split { justify-content: flex-start; text-align: left; }
  .kn-av-top small { font-size: 13px; }
}
.ov-next { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); }
.ov-next-d { flex: none; width: 46px; padding: 5px 0 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); text-align: center; line-height: 1.1; }
.ov-next-d b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.ov-next-d span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ov-next-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ov-next-t small { color: var(--muted); font-size: 12px; }
.ov-next-t b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-next-a { flex: none; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-lbl .qa { margin-left: 6px; }

/* ===== 1.76.89: свайп на телефоне и подробности «Баланса портфеля» ===== */
.kn-ring { touch-action: pan-y; }
@keyframes kn-in-r { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes kn-in-l { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.kn-ring.kn-in-r .kn-dn { animation: kn-in-r .25s ease-out; }
.kn-ring.kn-in-l .kn-dn { animation: kn-in-l .25s ease-out; }
.pf-slides { margin: 0 0 16px; }
.pf-slides-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 0 8px; }
.pf-slides-tabs::-webkit-scrollbar { display: none; }
.pf-slides-tabs button { flex: none; margin: 0; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.pf-slides-tabs button.on { background: var(--text); color: var(--panel); border-color: var(--text); }
.pf-slides-track { position: relative; display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; transition: height .2s ease; }
.pf-slides-track::-webkit-scrollbar { display: none; }
.pf-slides-track > .card { flex: 0 0 100%; min-width: 0; box-sizing: border-box; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.pf-bal-det { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; line-height: 1.4; }
.pf-bal-det .pbd-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pf-bal-det .pbd-h b { font-size: 15px; }
.pf-bal-det ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pf-bal-det li { display: flex; justify-content: space-between; gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.pf-bal-det li b { flex: none; font-variant-numeric: tabular-nums; }
.pf-bal-det li.more { color: var(--muted); border-top: 0; }
.pf-bal-det .pbd-f { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.pf-bal-det .pbd-f b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== 1.76.91: брокер и комиссия по умолчанию у счёта ===== */
.acc-fee { margin: 10px 0 4px; }
.acc-fee summary { cursor: pointer; font-weight: 500; }
.acc-fee-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.acc-fee-g input { width: 100%; box-sizing: border-box; }
.acc-fee p { margin: 8px 0 0; font-size: 12.5px; }
@media (max-width: 560px) { .acc-fee-g { grid-template-columns: minmax(0, 1fr); } }

/* ===== 1.76.93: пояснение про скриншоты ===== */
.shot-priv { margin: 8px 0 0; font-size: 13px; }
.shot-priv summary { cursor: pointer; color: var(--muted); }
.shot-priv p { margin: 8px 0 0; line-height: 1.45; }

/* 1.76.96: меню портфеля (⋯, правая кнопка, долгое нажатие) */
.pf-chip[data-pf-id] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pf-more { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; margin: 0 0 0 -4px; padding: 0 6px; font-size: 18px; line-height: 1; letter-spacing: 1px; background: var(--panel); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.pf-more:hover { color: var(--text); background: var(--panel-2); }
.pf-menu { min-width: 190px; }
.pf-menu .pf-menu-del { color: var(--bad, #c0392b); }

/* 1.76.96: вкладки «Календарь / Денежный поток», компактная сводка выплат */
.pay-tabs { margin-bottom: 12px; }
.cal-tiles { gap: 8px; margin-top: 0; }
.cal-tiles .st-tile { padding: 9px 12px; gap: 2px; border-radius: 10px; }
.cal-tiles .st-tile .k { font-size: 11px; }
.cal-tiles .st-tile .v { font-size: 17px; }
.cal-tiles .st-tile .s { font-size: 11px; line-height: 1.3; }
.cal-chart-h { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-canvas { height: 170px; margin-top: 4px; }
@media (max-width: 600px) { .cal-canvas { height: 170px; } }

/* 1.76.96: строка «Акции» над графиками портфеля */
.pf-stline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; font-size: 14px; }
.pf-stline:hover { border-color: var(--line-strong); }
.pf-stline b { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.pf-stline span { font-variant-numeric: tabular-nums; }
.pf-stline .good { color: var(--good); } .pf-stline .bad { color: var(--bad); }
.pf-stline em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--accent, var(--muted)); }
@media (max-width: 600px) { .pf-stline em { margin-left: 0; } }

/* 1.76.99: «Акции» одной карточкой, цели в Обзоре, компактный баланс */
.pfs-chart .pfs-top { margin-bottom: 8px; }
.pfs-h { margin: 0; font-size: 20px; }
.pfs-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.pfs-kpis > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); }
.pfs-kpis small { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.pfs-kpis b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pfs-kpis b i { font-size: 13px; font-style: normal; font-weight: 500; }
.pfs-kpis .good { color: var(--good); } .pfs-kpis .bad { color: var(--bad); }
@media (max-width: 700px) { .pfs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pfs-kpis b { font-size: 19px; } }
.pfs-chart .st-bar + .pf-curve-box { margin-top: 6px; }
.ov-goals { margin: 0 0 12px; }
.ov-goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; margin-bottom: 4px; }
.ov-goal { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ov-goal-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.ov-goal-h b { font-size: 14px; color: var(--ok-fg); }
.ov-goal .pbar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.ov-goal .pbar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.ov-goal small { font-size: 11px; }
.ov-goal-edit summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 2px 0; }
.ov-goal-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-top: 8px; }
.ov-goal-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); flex: 1 1 160px; min-width: 0; }
.ov-goal-form small { flex-basis: 100%; }
.pf-bal .pf-curve-box { height: 220px; min-height: 0; }
.pf-bal .pf-curve-box canvas { max-height: none; }
@media (max-width: 600px) { .pf-bal .pf-curve-box { height: 190px; } }

/* 1.76.100: шестерёнка внутри названия портфеля вместо кнопки «⋯» */
.pf-more { display: none; }
.pf-chip[data-pf-id] { display: inline-flex; align-items: center; gap: 7px; padding-right: 8px; }
.pf-cog { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; opacity: .6; cursor: pointer; }
.pf-cog:hover, .pf-cog:focus-visible { opacity: 1; background: rgba(128, 128, 128, .22); outline: 0; }
.pf-chip.on .pf-cog { opacity: .8; }

/* 1.76.100: облигации и баланс рядом */
.pf-viz2.one { grid-template-columns: minmax(0, 1fr); }
.pf-bal .st-bar { flex-wrap: wrap; gap: 6px 10px; }
.pf-bal .pf-curve-box { height: 190px; }
.pf-viz2 > .pf-bal, .pf-viz2 > .pf-bgrp { align-self: stretch; }

/* 1.76.103: календарь периода в «Операциях» */
.op-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 8px; }
.op-range label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.op-range input[type=date] { padding: 6px 8px; min-width: 150px; }
.op-range button { padding: 7px 14px; }
.op-quick { margin-bottom: 8px; }
.op-found { margin: 0 0 8px; font-size: 13px; }

.ov-inv { margin-top: 4px; font-size: 13px; color: var(--muted); }
.ov-inv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 1.76.111: «Внесено» и «Прибыль от инвестиций» крупно */
.ov-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 4px; }
.ov-kpi { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); }
.ov-kpi small { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.ov-kpi b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ov-kpi b i { font-size: 14px; font-style: normal; font-weight: 600; }
.ov-kpi.big b { font-size: 26px; }
.ov-kpi.good { background: var(--ok-bg, rgba(30, 143, 94, .12)); } .ov-kpi.good b { color: var(--good); }
.ov-kpi.bad { background: rgba(192, 57, 43, .10); } .ov-kpi.bad b { color: var(--bad); }
@media (max-width: 480px) { .ov-kpi b { font-size: 18px; } .ov-kpi.big b { font-size: 21px; } }

/* 1.76.122: «Вы вошли как …» в шапке */
.hdr-hi { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.hdr-hi b { color: var(--text); font-weight: 600; }
.hdr-hi:hover b { color: var(--brand); }
@media (max-width: 700px) { .hdr-hi { order: 1; max-width: 55vw; } .hdr-hi-t { display: none; } }

/* ==================== 1.76.127: гостевая страница — блоки-карусель на телефоне, один вход, подсказки пароля ==================== */
.gl-dots { display: none; }
@media (max-width: 700px) {
  .gl-cols { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; margin: 14px -16px 8px; padding: 2px 16px 6px; scrollbar-width: none; }
  .gl-cols::-webkit-scrollbar { display: none; }
  .gl-cols .gl-col { flex: 0 0 86%; scroll-snap-align: center; }
  .gl-dots { display: flex; justify-content: center; gap: 7px; margin: 0 0 14px; }
  .gl-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
  .gl-dots i.on { background: var(--accent); }
}
dialog.login-dlg .ld-pw { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
dialog.login-dlg .ld-links { display: flex; flex-direction: column; gap: 8px; }
dialog.login-dlg .ld-reg { padding-top: 10px; border-top: 1px solid var(--line); }
.pw-rules { list-style: none; margin: 8px 0 4px; padding: 0; font-size: 13px; color: var(--muted); display: grid; gap: 3px; }
.pw-rules li::before { content: "○"; display: inline-block; width: 1.4em; }
.pw-rules li.ok { color: var(--accent); }
.pw-rules li.ok::before { content: "✓"; }

/* ==================== 1.76.128: «Деньги» — два одинаковых блока с кольцами; на телефоне свайп ==================== */
.cash-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.cash-rings .cash-ring-box { box-sizing: border-box; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2, var(--panel)); }
.cash-rings .cash-ring-box .cf-eyebrow { align-self: flex-start; }
.cash-rings .cash-ring-box .cash-split-leg { margin-top: auto; }
.cash-dots { display: none; }
@media (max-width: 700px) {
  .cash-rings { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px 6px; }
  .cash-rings::-webkit-scrollbar { display: none; }
  .cash-rings .cash-ring-box { flex: 0 0 92%; scroll-snap-align: center; }
  .cash-dots { display: flex; justify-content: center; gap: 7px; margin: 4px 0 10px; }
}

/* ==================== 1.76.129: памятка «Счёт → рубли → сделки» ==================== */
.ob-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.ob-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; opacity: .65; }
.ob-steps li.now { opacity: 1; border-color: var(--accent); }
.ob-steps li.done { opacity: .85; }
.ob-steps li p { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.ob-steps li:not(.now) p { margin-bottom: 0; }
.ob-n { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2, var(--panel)); border: 1px solid var(--line-strong); font-weight: 700; }
.ob-steps li.now .ob-n { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.ob-steps li.done .ob-n { color: var(--accent); border-color: var(--accent); }

/* ==================== 1.76.137: «Заполнить по скриншоту» и «Добавить сделки» — главные действия ==================== */
.bf-shot { border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); padding: 16px; }
.bf-shot .shot-btn, .bf-shot button.shot-btn.ghost { background: var(--accent); border: 1px solid var(--accent); color: var(--on-ink); font-weight: 700; font-size: 16px; padding: 12px 20px; border-radius: 10px; min-height: 46px; }
.bf-shot .shot-btn:hover { filter: brightness(1.08); }
.bf-shot .shot-btn:disabled { opacity: .6; }
.bf-shot .shot-or { color: var(--text); }
.bf-shot button.shot-go { display: block; width: 100%; box-sizing: border-box; margin: 16px 0 0; padding: 14px 18px; min-height: 52px; font-size: 17px; font-weight: 700; border-radius: 12px;
  background: var(--accent); border: 1px solid var(--accent); color: var(--on-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.bf-shot button.shot-go:disabled { background: var(--panel-2); border-color: var(--line-strong); color: var(--muted); box-shadow: none; }
.bf-shot button.shot-go:not(:disabled):hover { filter: brightness(1.08); }

/* ==================== 1.76.142: итог загрузки сделок по скриншоту ==================== */
.bf-shot .shot-msg.shot-done { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line-strong); color: var(--text); font-size: 14px; }
.bf-shot .shot-msg.shot-done b { font-size: 17px; }
.bf-shot .shot-msg.shot-done.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.bf-shot .shot-msg.shot-done.ok b { color: var(--good); }
.bf-shot .shot-msg.shot-done.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--text); }
.bf-shot .shot-msg.shot-done.bad b { color: var(--bad); }
.bf-shot .shot-done-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; font-weight: 600; }
/* пока на экране таблица сделок из скриншотов, общая кнопка «Добавить покупку» скрыта: действует «Добавить сделки» */
form.bf-batch .bf-go, form.bf-batch #bfGo { display: none; }

/* описание счёта на странице «Деньги» */
.cash-acc-desc { display: block; margin: 2px 0 10px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cash-all-row .cash-acc-desc { margin: 2px 0 0; font-size: 12px; }

/* ==================== 1.76.152: синяя палитра (графит-синий #152A3D → #437FB1). Зелёный/красный для плюса/минуса остаются. ==================== */
:root {
  --bg: #EEF3F8; --brand-frost: #EEF3F8; --brand-mist: #E4ECF4;
  --panel: #ffffff; --panel-2: #F3F7FB; --field-bg: #ffffff;
  --line: #D3DEE9; --line-strong: #B8C8D8;
  --text: #152A3D; --brand-ink: #152A3D; --muted: #4F647A;
  --accent: #294F74; --accent-2: #1F3F5E; --sel: #294F74; --on-ink: #ffffff;
  --brand-night: #152A3D; --brand-steel: #6F8296;
  --info-bg: #E3EDF7; --info-fg: #294F74;
  --chart-fill: rgba(41, 79, 116, 0.08); --chart-grid: #DCE6F0; --s-invested: #B8C8D8;
  --shadow: rgba(21, 42, 61, 0.06);
  --logo-ink: #152A3D; --logo-tld: #6F8296;
  --c1: #294F74; --c2: #437FB1; --c3: #3A668B;
}
:root[data-theme="dark"] {
  --bg: #0E1B29; --brand-frost: #0E1B29; --brand-mist: #1B3550;
  --panel: #152A3D; --panel-2: #1B3550; --field-bg: #0E1B29;
  --line: #26435F; --line-strong: #35597D;
  --text: #EAF2F9; --brand-ink: #EAF2F9; --muted: #A3BAD0;
  --accent: #5B9BCF; --accent-2: #8DB8DE; --sel: #5B9BCF; --on-ink: #06121E;
  --brand-night: #0A1522; --brand-steel: #8DA3B8;
  --info-bg: #1B3550; --info-fg: #A9CCE8;
  --chart-fill: rgba(234, 242, 249, 0.08); --chart-grid: #26435F; --s-invested: #35597D;
  --shadow: rgba(0, 0, 0, 0.35);
  --logo-ink: #EAF2F9; --logo-tld: #8DA3B8;
  --c1: #5B9BCF; --c2: #7FB2DB; --c3: #A9CCE8;
}
/* Гостевая главная: цветные полосы у карточек, мягкий фон и тени */
body:has(.gl-hero) { background: linear-gradient(180deg, #D6E4F1 0, var(--bg) 420px); }
:root[data-theme="dark"] body:has(.gl-hero) { background: radial-gradient(800px 420px at 100% -10%, rgba(67,127,177,.30) 0, transparent 65%), var(--bg); }
.gl-col { border-radius: 16px; border-top: 4px solid var(--c, var(--accent)); box-shadow: 0 10px 28px -16px rgba(21, 42, 61, .35); }
.gl-col:nth-child(1) { --c: var(--c1); } .gl-col:nth-child(2) { --c: var(--c2); } .gl-col:nth-child(3) { --c: var(--c3); }
.gl-col h2 { color: var(--c, var(--text)); }
.gl-col .gl-points li::marker { color: var(--c, var(--accent)); }
.gl-intro h1 { letter-spacing: -.02em; }
.gl-cta-band { border-radius: 16px; }
.gl-cta .gl-b1 { box-shadow: 0 6px 16px -8px var(--accent); }

/* 1.76.155: выплаты на 30 дней — карусель со свайпом */
.ov-nx { margin-top: 14px; }
.ov-nx-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.ov-nx-track::-webkit-scrollbar { display: none; }
.ov-nx-track .ov-next { flex: 0 0 100%; margin-top: 0; scroll-snap-align: start; box-sizing: border-box; min-width: 0; }
.ov-nx-dots { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.ov-nx-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.ov-nx-dots i.on { background: var(--accent); width: 16px; border-radius: 3px; }
.ov-nx-dots .muted { margin-left: 8px; font-size: 12px; }

/* 1.76.157: значки в списке «Ещё» */
.more-list a { display: flex; align-items: center; gap: 10px; }
.more-list a svg { flex: none; color: var(--accent); }
.more-list a span { min-width: 0; }

/* 1.76.158: «Обзор» — поиск по бумагам сверху, вкладки портфелей под главной карточкой */
.ov-hero + .pf-switch { margin-top: 14px; }

/* 1.76.159: выбор акции на графике «Прибыль и убыток» — таблетки вместо системного списка */
.pfs-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 4px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; flex: 1 1 100%; }
.pfs-chips::-webkit-scrollbar { display: none; }
.pfs-chips button { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pfs-chips button b { font-weight: 700; }
.pfs-chips button span { color: var(--muted); font-size: 12.5px; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
.pfs-chips button.on { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.pfs-chips button.on span { color: inherit; opacity: .85; }
#pfsSel[hidden] { display: none; }

/* 1.76.162: «Внесено всего» в «Деньги» → «Остатки как у брокера» */
.cash-inv { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cash-inv label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.cash-inv .mini { flex: 1 1 100%; margin: 0; }

/* 1.76.164: «Обзор» на телефоне — меньше расстояние между шапкой и полем поиска по бумагам */
@media (max-width: 700px) {
  main:has(.ov-wrap) { margin-top: 12px; }
}

/* 1.76.166: поиск в «Обзоре» — поле на всю ширину (общее правило main input ограничивало его 420px), на ПК компактнее */

/* 1.76.167: поле поиска в «Обзоре» ниже (около 38px вместо 52px), на телефоне и на ПК */

/* 1.76.168: один вид поиска везде — «таблетка» с лупой слева (шапка, «Обзор», страница поиска, рынок, акции, дивиденды, новости, справка, школа и др.) */
input[type="search"]:not(#_) {
  box-sizing: border-box; height: 36px; padding: 0 14px 0 38px; margin: 0;
  border: 1px solid var(--line-strong); border-radius: 999px; background-color: var(--panel); color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none' stroke='%238794a6' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='M13.2 13.2L17 17'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center; background-size: 18px 18px;
  font: inherit; font-size: 15px; line-height: 1.2; outline: none;
}
input[type="search"]:not(#_):focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.nt-search input[type="search"]:not(#_) { padding-right: 92px; }
.hdr-search input[type="search"]:not(#_) { height: 34px; font-size: 14px; }
.srch-form .btn { border-radius: 999px; height: 36px; padding: 0 18px; }
input[type="search"]::placeholder { color: var(--muted); opacity: .8; }
/* «Обзор»: поле поиска на всю ширину, без отдельной кнопки (Enter / «Найти» на клавиатуре телефона) */
.ov-search { display: block; margin: 0 0 10px; }
.ov-search input { width: 100%; max-width: none !important; }
.ov-search button { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; padding: 0; border: 0; }
@media (max-width: 700px) { main:has(.ov-wrap) { margin-top: 12px; } }

/* 1.76.169: страница поиска — кнопка «Найти» на одной линии с полем */
.srch-form { align-items: center !important; }
.srch-form .btn, .srch-form button { margin: 0 !important; height: 36px; box-sizing: border-box; padding: 0 18px; line-height: 1; display: inline-flex; align-items: center; align-self: center; }
