/* TARK 24: поверх стилей основы (версия Захара, tark10). Только то, что добавили правки:
   «скоро» у Tark Balance (размытая форма, плашка), ссылка-вкладка в мониторинге, страница «скоро».
   Цвета из палитры основы (refinement.css): сталь #416993, чернила #172632, приглушённый #586b79. */
:root {
  --t24-steel: #416993;
  --t24-steel-deep: #2f5274;
  --t24-tint: #edf4f8;
  --t24-ink: #172632;
  --t24-mute: #586b79;
  --t24-line: #d8e0e5;
  --t24-paper: #ffffff;
  --t24-on-dark-mute: #b8c9d5;
  --t24-menu: #182a37;
  --t24-card-light: #ffffff;
  --t24-card-ink: #172632;
  --t24-card-mute: #586b79;
  --t24-card-line: #d8e0e5;
  --t24-menu-line: #2c4050;
  /* переменные основы, которые слой стали не переопределил: зелёный и мятный оставались в линиях
     заголовков и подложках */
  --brand-hi: var(--t24-steel);
  --mint: var(--t24-tint);
  --mint-line: var(--t24-line);
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--t24-tint);
  color: var(--t24-steel-deep);
  font: 600 11px/1.2 Onest, system-ui, sans-serif;
  letter-spacing: .02em;
  vertical-align: middle;
}

/* вкладка Tark Balance в мониторинге: ссылка на «скоро», а не переключатель */
.seg-soon {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--t24-mute);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.seg-soon:hover { color: var(--t24-ink); background: var(--t24-tint); }
.seg-soon:focus-visible { outline: 2px solid var(--t24-steel); outline-offset: 2px; }

/* размытая форма вместо кривой: без чисел и дат */
.soon-svg { display: block; width: 100%; height: auto; }
.soon-line { fill: none; stroke: var(--t24-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.soon-area { fill: var(--t24-steel); fill-opacity: .12; stroke: none; }
.is-soon .strategy-preview { position: relative; }
.is-soon .strategy-preview .soon-svg, .spark-soon .soon-svg { filter: blur(5px); opacity: .55; }
.is-soon .strategy-preview small { display: block; margin-top: 6px; font-size: 12px; color: var(--t24-mute); }
.spark-soon { display: block; overflow: hidden; }

/* страница «скоро» */
.soon-head .page-h .badge-soon { font-size: 14px; padding: 5px 12px; position: relative; top: -10px; }
.crumbs { font-size: 13px; color: var(--t24-mute); margin-bottom: 18px; }
.crumbs a { color: var(--t24-mute); }
.soon-stage {
  position: relative;
  border: 1px solid var(--t24-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--t24-paper);
  min-height: 320px;
}
.soon-big { height: 320px; filter: blur(9px); opacity: .5; transform: scale(1.03); }
.soon-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 32px));
  background: var(--t24-paper);
  border: 1px solid var(--t24-line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 24px 60px -30px rgba(14, 19, 24, .35);
}
.soon-card h2 { font-size: 28px; margin: 12px 0 8px; color: var(--t24-ink); }
.soon-card p { color: var(--t24-mute); margin: 0 0 14px; line-height: 1.55; }
.soon-card .badge-soon { margin-left: 0; }
.soon-acts { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 6px; }
.soon-acts .btn {
  display: inline-flex !important;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--t24-steel);
  color: var(--t24-paper);
  font-size: 15px;
  text-decoration: none;
}
.soon-acts .btn:hover { background: var(--t24-steel-deep); }
.soon-acts .text-link { color: var(--t24-steel-deep); }
@media (max-width: 760px) {
  .soon-stage { min-height: 0; }
  .soon-big { height: 200px; }
  .soon-card { position: static; transform: none; width: auto; margin: 0 12px 12px; padding: 22px; box-shadow: none; }
}

/* фиолетовый слой основы переводится в сталь целиком, через его же переменные */
:root { --violet: var(--t24-steel-deep); --violet-wash: var(--t24-tint); --violet-line: var(--t24-line); }

/* подпись «Asset Management» у знака в подвале шла тёмным по тёмному: контраст 2,1 при норме 4,5 */
.foot .brand-word small { color: var(--t24-on-dark-mute); }

/* Палитра TARK 24. Саша 29.10: «красно-синий примитивный, школьный». В основе плюс был стальным синим,
   минус малиновым, а на тёмном первом экране пастельным голубым и розовым. Теперь основа чернила и белая
   бумага, один акцент сталь (кнопки, выбранное, плюс на графиках), один смысловой цвет гранат только для
   минуса. Плюс набран чернилами, тёмные блоки монохромны, таблица месяцев без заливок.
   Пара проверена валидатором dataviz: различие при нарушениях цветового зрения dE 17,5, контраст выше 3:1. */
:root {
  --up: #36679c;
  --up-ink: var(--ink);
  --down: #a3352f;
  --down-ink: #a3352f;
  --down-mute: #a3352f;
  --down-soft: rgba(19, 33, 43, .05);
  --down-deep: rgba(19, 33, 43, .12);
  --blue-light: #eef3f6;
  --risk-light: #8ea2b1;
}
.dark-intro .btn { background: var(--t24-paper); border-color: var(--t24-paper); color: var(--t24-ink); }
.dark-intro .btn:hover { background: var(--t24-tint); }
.dark-stats .hero-metrics b, .dark-stats .hero-metrics b.down { color: var(--blue-light); }
.kpi-up, .kpi-down { background: var(--bg-hi); border-color: var(--line); }

/* страница 404: подвал не поднимается к середине экрана */
.nf-sec { min-height: 56vh; }

/* Меню на телефоне в основе нечитаемо (и на tark10 тоже): ранний слой красит панель светлым с !important,
   тёмная тема даёт светлый текст и проигрывает по важности. Панель продолжает тёмную шапку. */
@media (max-width: 900px) {
  .tark-dark .nav, .tark-dark.atlas-page .nav { background: var(--t24-menu) !important; --line: var(--t24-menu-line); }
}

/* «Связаться» в меню телефона; на широком экране есть кнопка в шапке */
.nav .nav-cta { display: none; }
@media (max-width: 900px) {
  .tark-dark .nav > a { font-size: 20px; }
  .tark-dark .nav .nav-cta { display: inline-flex; align-self: flex-start; margin-top: 28px; padding: 13px 22px; border: 0;
    border-radius: 4px; background: var(--t24-paper); color: var(--t24-ink); font-size: 15px; }
}

/* Один акцент вместо пяти синих (рецензия кадров 29.10: бледно-голубой, стальной, серо-голубой фон формы и
   пыльные клетки читались как разные цвета). Кнопки, ссылки, выбранное и линии-акценты глубоким синим,
   подложки нейтральные. Плюс на графиках #2a5288 проходит валидатор dataviz (светлота, насыщенность,
   различие с минусом dE 14,4, контраст). */
:root {
  --accent: #1c3d6e;
  --brand: #1c3d6e;
  --up: #2a5288;
  --area-hi: rgba(28, 61, 110, .06);
  --area-lo: rgba(28, 61, 110, 0);
  --t24-steel: #1c3d6e;
  --t24-steel-deep: #142e54;
  --t24-tint: #eef1f4;
  --t24-section: #eceff2;
}
.btn:hover { background: var(--t24-steel-deep); }
.tark-dark .fin, .tark-dark .fin.fin-plain { background: var(--t24-section); }

/* Доводка по рецензии кадров 29.10 */
/* подписи схемы сделки набирались засечным шрифтом по умолчанию, на телефоне были около 5 px */
/* в основе .phase-marker text набран шрифтом TarkSerif, которого на сайте нет: падал в Georgia */
.phase-marker text { font-family: Onest, system-ui, sans-serif; }
@media (max-width: 700px) { .phase-marker text { font-size: 30px; } .mechanism-svg .chart-label { font-size: 26px; } }
/* «Подробный анализ»: шеврон вместо голого браузерного треугольника */
.analysis-details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 44px; }
.analysis-details > summary::-webkit-details-marker { display: none; }
.analysis-details > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.analysis-details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
/* крупные числа плотнее: табличные цифры рассыпались по знакам */
.kpi b, .card-figs b, .dark-stats .hero-metrics b { letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* один компонент статуса: «Мониторинг» и «Скоро» одной формы и регистра */
.badge, .badge-soon { display: inline-flex; align-items: center; border: 0; border-radius: 3px; padding: 3px 8px; background: var(--t24-tint);
  color: var(--t24-steel-deep); font: 500 11px/1.3 Onest, system-ui, sans-serif; letter-spacing: .01em; text-transform: none; }
/* одна основная кнопка: форма и радиус как у «Отправить заявку» */
.soon-acts .btn { border-radius: 6px; min-height: 48px; padding: 0 22px; font-size: 14px; }
/* списки «До принятия решения» как остальные списки: свои точки вместо браузерных */
.dossier-risk .risk-list { list-style: none; padding-left: 0; }
.dossier-risk .risk-list li { position: relative; padding-left: 18px; }
.dossier-risk .risk-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
/* мелкий текст не меньше 12 px, подпись знака крупнее */
.dark-intro .hero-fact, .dark-plot-footer .chart-readout, .dark-stats .figure-source, .dark-stats .figure-source > span,
.lead-form .small, .monitor-source, .range-note { font-size: 12px; }
.tark-dark .hdr .brand-word small { font-size: 9px; }
/* история: пустая полоса между крошками и линией */
.s-head-crumbs { padding-bottom: 0; }
.s-head-crumbs + .sec { padding-top: 28px; }
@media (max-width: 700px) {
  .tark-dark .hdr .brand-word small { font-size: 8.5px; }
  /* зоны нажатия не меньше 44 px, подвал в столбик */
  .dark-intro .hero-secondary, .plot-link, .text-link, .card-link, .foot a, .range-editor > summary { min-height: 44px; display: inline-flex; align-items: center; }
  .foot nav, .foot .footer-nav, .foot-nav { display: flex; flex-direction: column; gap: 0; }
  /* подпись «Дневной ряд мониторинга» висела без спарклайна */
  .strategy-explainer small { display: none; }
  /* Tark Balance на телефоне: без пустого поля и рамки в рамке */
  .soon-stage { border: 0; background: none; }
  .soon-big { height: 130px; }
  .soon-card { margin: 0; }
}

/* Согласие на обработку данных в форме и правовые страницы (Саша 29.10) */
.lead-form label.consent { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; margin: 2px 0 6px; font-size: 13px; line-height: 1.5; color: var(--mute); cursor: pointer; }
.lead-form label.consent input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.consent-err { display: block; margin: 0 0 10px 28px; }
.consent-err[hidden] { display: none; }
.foot-legal { font-size: 12px; }
.foot-legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal-doc { padding-top: 8px; }
.legal-doc > * { max-width: 780px; }
.legal-doc h2 { margin: 30px 0 10px; font-size: 22px; line-height: 1.3; color: var(--ink); }
.legal-doc p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--ink-2, var(--ink)); }
.legal-doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-doc .legal-upd { margin-top: 28px; font-size: 13px; color: var(--mute); }
.consent-note { margin: 0 0 12px 28px; }
.consent-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Правки Саши 29.10, второе голосовое */
/* подсказки графиков: в основе белый текст на белой подложке, ничего не видно */
.tip { color: var(--ink); }
.tip .mute, .tip small { color: var(--mute); }
.tip .neg { color: var(--down-mute); }
/* графики без красно-синей пары: минус на графиках приглушённым серым, цифры минуса остаются гранатом */
:root { --down: #8e9ba7; }
.stop-line { stroke: var(--down-mute); }
.chart-label-risk { fill: var(--down-mute); }
/* размытая форма Tark Balance: базовое правило обводило и заливку, справа шла палка вниз */
.strategy-preview .soon-area { stroke: none; }
/* первый экран: без ярлыка алгоритма и строки под графиком, цифры и срок */
.dark-stats { grid-template-columns: minmax(0, 1fr) auto; }
.dark-stats .hero-metrics { border-left: 0; padding-left: 0; }
.dark-plot-footer { justify-content: flex-end; }
.dark-plot-footer .chart-readout { display: none; }
/* мониторинг: без «на конец периода» */
.current-drawdown { display: none; }
/* переходы на мониторинг заметны сразу */
.go-link { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  background: var(--accent); color: var(--t24-paper); font-size: 13px; font-weight: 500; text-decoration: none; }
.go-link:hover { background: var(--t24-steel-deep); color: var(--t24-paper); }
.go-link .arrow { width: 20px; }
.go-link-ghost { background: var(--t24-tint); color: var(--accent); }
.go-link-ghost:hover { background: var(--accent); color: var(--t24-paper); }
.dark-plot-footer .go-link { background: var(--t24-paper); color: var(--t24-ink); }
.dark-plot-footer .go-link:hover { background: var(--t24-tint); }
/* «Подробный анализ» заметной полосой */
.analysis-details > summary { padding: 14px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-hi);
  font-size: 15px; font-weight: 500; color: var(--accent); }
.analysis-details > summary:hover { border-color: var(--accent); }
.analysis-details[open] > summary { margin-bottom: 18px; }
/* условия: риски и вопросы в той же ширине, что блоки выше, заголовок слева */
@media (min-width: 1000px) {
  .t24-cond #risk, .t24-cond #faq { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr); column-gap: 64px; align-items: start; }
  .t24-cond #risk > .sec-head, .t24-cond #faq > .sec-head { position: sticky; top: 110px; margin-bottom: 0; }
  .t24-cond #risk .risk-list, .t24-cond #faq .faq { max-width: none; width: 100%; margin-top: 0; }
}

/* переключатель оформления в шапке */
.theme-tgl { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 12px; padding: 0;
  border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .85; }
.theme-tgl:hover { opacity: 1; }
.theme-tgl svg { width: 18px; height: 18px; }
.theme-tgl:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 900px) { .theme-tgl { width: 38px; height: 38px; margin-right: 10px; } }


/* Связь через Telegram вместо формы заявки */
.tg-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.tg-note { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2, var(--ink)); }
.tg-btn { display: inline-flex !important; align-items: center; gap: 14px; }

/* Меню на телефоне на главной открывалось полоской в один пункт (скрин 29.10): шапка главной в основе
   центрируется через transform, а у fixed-потомка с transform-предком высота считается от шапки, а не от экрана */
@media (max-width: 900px) {
  .atlas-page .hdr { left: 0; right: 0; width: 100%; transform: none; }
}

/* подсказка на графике первого экрана, как на мониторинге (светлая карточка в обоих оформлениях) */
.dark-plot { position: relative; }
.hero-tip { position: absolute; top: 0; left: 0; z-index: 4; pointer-events: none; min-width: 180px; padding: 10px 12px;
  border: 1px solid var(--t24-card-line); border-radius: 8px; background: var(--t24-card-light); color: var(--t24-card-ink);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .55); font: 12px/1.5 Onest, system-ui, sans-serif; }
.hero-tip b { display: block; margin-bottom: 3px; font-weight: 600; }
.hero-tip span { display: block; color: var(--t24-card-mute); }
.hero-tip em { font-style: normal; color: var(--t24-card-ink); font-variant-numeric: tabular-nums; }
