/* Инвестор — стили. База (токены, кнопки, карточки, сводка, таблица, тост) скопирована один к одному
   из modules/payment-requests/public/styles.css (тот же вид, что у Платёжного календаря).
   Ниже базы — только слой модуля: вкладки, ячейки ввода/формул, сетка, график, питч. */
:root {
  --bg: oklch(14.5% 0 0);
  --panel: oklch(20.5% 0 0);
  --panel-2: oklch(26.9% 0 0);
  --row: oklch(20.5% 0 0);
  --row-h: oklch(26.9% 0 0);
  --bd: oklch(26.9% 0 0);
  --bd-2: oklch(32.5% 0 0);
  --grid: oklch(42% 0 0);
  --grid-strong: oklch(55% 0 0);
  --tx: oklch(98.5% 0 0);
  --tx-2: oklch(70.8% 0 0);
  --tx-3: oklch(55% 0 0);
  --pri: oklch(62% .19 264);
  --pri-2: oklch(48.8% .243 264.376);
  --red: #e5484d;
  --amber: #f5a623;
  --green: #46a758;
  --blue: #4a78c4;
  --violet: #8b7bd8;
  --radius: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--tx);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1720px; margin: 0 auto; padding: 18px 28px 80px; }

/* topbar */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.crumbs { color: var(--tx-3); font-size: 13px; }
.crumbs b { color: var(--tx-2); font-weight: 500; }
.spacer { flex: 1; }

h1 { font-size: 22px; font-weight: 650; margin: 6px 0 2px; display: flex; align-items: center; gap: 10px; }
h1 svg { width: 22px; height: 22px; color: var(--pri); }
.sub { color: var(--tx-2); font-size: 13.5px; max-width: 900px; margin-bottom: 16px; }

.btn {
  padding: 8px 14px; border-radius: 0; border: 1px solid var(--bd-2);
  background: var(--panel-2); color: var(--tx); cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.btn:hover { background: var(--row-h); }
.btn.primary { background: var(--pri-2); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn svg { width: 15px; height: 15px; }
.btn[disabled] { opacity: .5; cursor: default; }

.card {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--radius);
  margin-bottom: 18px;
}

/* ---- Сводка по статусам ---- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sumcard { min-width: 0; }
.sumcard {
  background: var(--panel); border: 1px solid var(--bd); padding: 12px 14px;
  position: relative; overflow: hidden; cursor: pointer; transition: background .12s;
}
.sumcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--tx-3)); }
.sumcard:hover { background: var(--panel-2); }
.sumcard.active { background: var(--panel-2); border-color: var(--bd-2); }
.sumcard .lbl { font-size: 12px; color: var(--tx-2); display: flex; align-items: center; gap: 6px; }
.sumcard .lbl i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--tx-3)); display: inline-block; }
.sumcard .val { font-size: 19px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.sumcard .cnt { font-size: 12px; color: var(--tx-3); margin-top: 2px; }
.sumcard.total { background: linear-gradient(180deg, rgba(120,140,200,.10), transparent); }

@media (max-width: 700px) { .summary { grid-template-columns: repeat(2, 1fr); } }
/* полосы прокрутки таблиц — тонкие, в цветах модуля, а не системные */
.table-scroll, .hscroll-top { scrollbar-width: thin; scrollbar-color: var(--bd-2) transparent; }
.table-scroll::-webkit-scrollbar, .hscroll-top::-webkit-scrollbar { height: 8px; width: 8px; }
.table-scroll::-webkit-scrollbar-track, .hscroll-top::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb, .hscroll-top::-webkit-scrollbar-thumb { background: var(--bd-2); border-radius: 4px; }
.table-scroll::-webkit-scrollbar-thumb:hover, .hscroll-top::-webkit-scrollbar-thumb:hover { background: var(--tx-3); }
/* блоки инвесторов и оборудования — не растягивать на всю ширину экрана: числа рядом с подписями */
.pane[data-pane="investors"] > .card { max-width: 1180px; }
/* итоги по сценариям: 11 колонок в ширину экрана — заголовки в две строки, без прокрутки */
.card.res thead th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.card.res table { font-size: 13px; }
.card.res tbody td { padding: 7px 7px; }

/* ---- Тулбар / фильтры ---- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.fchip {
  padding: 6px 12px; border: 1px solid var(--bd); background: var(--panel);
  color: var(--tx-2); cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px;
}
.fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--tx-3)); display: inline-block; }
.fchip:hover { background: var(--panel-2); color: var(--tx); }
.fchip.active { background: var(--pri-2); border-color: transparent; color: #fff; }
.fchip.active i { background: #fff; }

.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--tx-3); pointer-events: none; }
.search input {
  background: var(--panel); border: 1px solid var(--bd); color: var(--tx);
  padding: 7px 12px 7px 32px; font-size: 13px; width: 300px; border-radius: 0;
}
.search input:focus { outline: none; border-color: var(--pri); }
.sel {
  background: var(--panel); border: 1px solid var(--bd); color: var(--tx);
  padding: 7px 10px; font-size: 13px; border-radius: 0; max-width: 220px;
}
.sel:focus { outline: none; border-color: var(--pri); }

/* ---- Таблица ---- */
.table-card { padding: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; border: 0; font-size: 13px; }
thead th {
  color: var(--tx-2); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px;
  background: var(--panel-2); padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--bd-2);
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
thead th.right, tbody td.right { text-align: right; }
thead th.center, tbody td.center { text-align: center; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--tx); }
thead th .arrow { opacity: .5; font-size: 10px; }
tbody td { padding: 9px 10px; border-bottom: 1px solid var(--bd); vertical-align: middle; }
tbody tr:hover { background: var(--row-h); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--tx-3); }
.empty { text-align: center; color: var(--tx-3); padding: 40px 0 !important; }

.rq-title .link { color: var(--blue); display: inline-flex; }
.rq-sub { font-size: 11.5px; color: var(--tx-3); margin-top: 2px; }
.who .role { font-size: 11px; color: var(--tx-3); }
.proj .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--pri); display: inline-block; }


/* ======================= Слой модуля «Инвестор» ======================= */
:root { --in-bg: rgba(245,166,35,.10); --in-bd: rgba(245,166,35,.45); --in-tx: #9ec1ff; --calc-bg: oklch(23.5% 0 0); }
.crumbs.hidden { display: none; }
.savestate { font-size: 12px; color: var(--tx-3); white-space: nowrap; }
.savestate.busy { color: var(--amber); }
.savestate.err { color: var(--red); }
.state { color: var(--tx-3); padding: 30px 0; text-align: center; }
.state.err { color: var(--red); }

/* вкладки — сверху, одна полоса, без круглых форм */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--bd-2); margin-bottom: 16px; }
.tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--tx-2);
  padding: 9px 18px; font-size: 14px; cursor: pointer; margin-bottom: -1px; font-weight: 500;
}
.tab:hover { color: var(--tx); background: var(--panel); }
.tab:focus-visible { outline: 2px solid var(--pri); outline-offset: -2px; }
.tab.active { color: var(--tx); border-bottom-color: var(--pri); }
@media (prefers-reduced-motion: no-preference) { .tab { transition: color .12s, background .12s; } }

/* панель финмодели */
.mtoolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--tx-3); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 12px; margin-right: 5px; vertical-align: -2px; border: 1px solid var(--bd-2); }
.legend i.in { background: var(--in-bg); border-color: var(--in-bd); }
.legend i.calc { background: var(--calc-bg); }
.sumcard.green::before { background: var(--green); } .sumcard.amber::before { background: var(--amber); } .sumcard.red::before { background: var(--red); }

/* сетка карточек */
.grid2 { display: grid; grid-template-columns: minmax(420px, 5fr) minmax(420px, 7fr); gap: 18px; align-items: start; }
@media (max-width: 1500px) { .grid2 { grid-template-columns: 1fr; } }
.card h2 { font-size: 14px; font-weight: 600; margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 10px; }
.card h2 .hint { font-weight: 400; color: var(--tx-3); font-size: 12px; }
.card h2 { flex-wrap: wrap; row-gap: 4px; }   /* длинная подсказка уходит на вторую строку, заголовок не рвётся */
.card h2 .spacer { flex: 1; }
.card + .card { margin-top: 18px; }

/* таблицы модели */
.table-scroll { overflow: auto; max-height: 72vh; }
.grid2 .table-scroll { max-height: none; }
table.grid tbody td { padding: 0; border-right: 1px solid var(--bd); height: 32px; }
table.grid thead th { border-right: 1px solid var(--bd); }
table.grid tbody td > .cell, table.grid tbody td > input.cell { display: block; padding: 7px 10px; height: 32px; line-height: 18px; box-sizing: border-box; }
.cell.num, input.cell.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell.calc { background: var(--calc-bg); color: var(--tx-2); }
.cell.calc.strong { color: var(--tx); font-weight: 600; }
.cell.neg { color: var(--red); }
.cell.zero { color: var(--tx-3); }
input.cell {
  width: 100%; border: 0; border-left: 2px solid var(--in-bd); background: var(--in-bg); color: var(--in-tx);
  font: inherit; font-weight: 550; outline: none; border-radius: 0; min-width: 90px;
}
input.cell:hover { background: rgba(245,166,35,.16); }
input.cell:focus { background: rgba(245,166,35,.2); box-shadow: inset 0 0 0 1px var(--amber); color: var(--tx); }
input.cell.text { color: var(--tx-2); font-weight: 400; text-align: left; }
input.cell.invalid { box-shadow: inset 0 0 0 1px var(--red); }
table.grid tbody td.label { padding: 7px 10px; white-space: nowrap; }
table.grid tbody td.label .grp { display: block; font-size: 10.5px; color: var(--tx-3); text-transform: uppercase; letter-spacing: .3px; }
table.grid tbody td.unit { padding: 7px 10px; color: var(--tx-3); white-space: nowrap; font-size: 12px; }
table.grid tbody td.note { padding: 7px 10px; color: var(--tx-3); font-size: 12px; max-width: 320px; }
table.grid tbody tr.total td { background: var(--panel-2); border-top: 1px solid var(--bd-2); font-weight: 600; }
table.grid tbody tr.total td .cell.calc { background: transparent; color: var(--tx); }
table.grid tbody tr.milestone td.label { color: var(--amber); }
table.grid th.sticky, table.grid td.sticky { position: sticky; left: 0; z-index: 3; background: var(--panel); box-shadow: 1px 0 0 var(--bd-2); }
table.grid thead th.sticky { z-index: 4; background: var(--panel-2); }
table.grid tbody tr:hover td.sticky { background: var(--row-h); }
table.grid tbody tr.total td.sticky { background: var(--panel-2); }
table.grid thead th.in { color: var(--amber); }
table.grid thead th.in::after { content: " ✎"; opacity: .7; }
.scen { display: inline-block; width: 9px; height: 9px; margin-right: 6px; }
.scen.green { background: var(--green); } .scen.amber { background: var(--amber); } .scen.red { background: var(--red); }
.miss { color: var(--tx-3); font-style: italic; }

/* график */
.chart { padding: 12px 14px 8px; }
.chart svg { width: 100%; height: 260px; display: block; }
.chart .gridline { stroke: var(--bd-2); stroke-width: 1; }
.chart .axis { fill: var(--tx-3); font-size: 11px; }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.green { stroke: var(--green); } .chart .line.amber { stroke: var(--amber); } .chart .line.red { stroke: var(--red); }
.chart .dot.green { fill: var(--green); } .chart .dot.amber { fill: var(--amber); } .chart .dot.red { fill: var(--red); }
.chart .goal { stroke: var(--tx-3); stroke-dasharray: 4 4; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--tx-2); padding: 0 14px 12px; }

/* питч */
.pitch { max-width: 1180px; }
.pitch .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
@media (max-width: 900px) { .pitch .kpis { grid-template-columns: repeat(2, 1fr); } }
.pitch .kpi { background: var(--panel); border: 1px solid var(--bd); padding: 14px 16px; position: relative; }
.pitch .kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pri); }
.pitch .kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.pitch .kpi .lbl { font-size: 12px; color: var(--tx-2); margin-top: 4px; }
.pitch .lead { font-size: 15px; color: var(--tx); max-width: 980px; margin: 0 0 6px; line-height: 1.5; }
.pitch .meta { color: var(--tx-3); font-size: 12px; margin-bottom: 22px; }
.pitch section { margin-bottom: 26px; }
.pitch h2 { font-size: 18px; font-weight: 650; margin: 0 0 6px; display: flex; gap: 10px; align-items: baseline; }
.pitch h2 .n { color: var(--tx-3); font-weight: 500; font-size: 14px; min-width: 22px; }
.pitch p { color: var(--tx-2); max-width: 980px; margin: 0 0 10px; line-height: 1.5; }
.pitch table { font-size: 13px; }
.pitch tbody td { padding: 8px 10px; vertical-align: top; }
.pitch .callout { border: 1px solid var(--bd-2); border-left: 3px solid var(--pri); background: var(--panel); padding: 10px 14px; color: var(--tx); max-width: 980px; margin: 10px 0 0; }
.pitch .src { color: var(--tx-3); font-size: 12px; margin-top: 6px; word-break: break-all; }
.pitch .src a { color: var(--blue); text-decoration: none; }
.pitch .src a:hover { text-decoration: underline; }
.pitch .card { margin-bottom: 10px; }

/* узкие экраны: шапка переносится, колонки сетки не раздуваются от широких таблиц (таблица скроллится внутри карточки) */
.top { flex-wrap: wrap; }
.grid2 > *, .card, .table-card { min-width: 0; }
.wrap { overflow-x: hidden; }
@media (max-width: 700px) { .savestate { order: 5; flex-basis: 100%; } }

/* во встроенном режиме заголовок прячется атрибутом hidden; display:flex у h1 из базы не должен его перебивать */
h1[hidden] { display: none; }

/* ---- в оболочке платформы: без второй рамки, во всю ширину, крупнее ---- */
body.embed { font-size: 15px; }
body.embed .wrap { max-width: none; padding: 4px 16px 40px; }
body.embed .sub { font-size: 14px; max-width: none; margin-bottom: 12px; }
body.embed table { font-size: 14px; }
body.embed thead th { font-size: 12px; }
body.embed .sumcard .val { font-size: 22px; }
/* питч в оболочке: одна читаемая колонка, разделы — карточки с крупным номером и заголовком (стиль .card модуля) */
body.embed .pitch { max-width: 1180px; margin: 0 auto; }
body.embed .pitch .lead { font-size: 17px; line-height: 1.55; max-width: none; margin-bottom: 8px; }
body.embed .pitch .meta { margin-bottom: 26px; }
body.embed .pitch section { background: var(--panel); border: 1px solid var(--bd); padding: 20px 24px 22px; margin-bottom: 18px; }
body.embed .pitch h2 { font-size: 22px; font-weight: 700; letter-spacing: -.2px; align-items: center; gap: 12px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--bd-2); }
body.embed .pitch h2 .n { min-width: 34px; height: 34px; border-radius: 50%; background: var(--pri); color: #fff; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
body.embed .pitch p { font-size: 15px; line-height: 1.6; max-width: none; margin-bottom: 12px; }
body.embed .pitch table { font-size: 14px; }
body.embed .pitch tbody td { padding: 10px 12px; }
body.embed .pitch .callout { max-width: none; font-size: 15px; line-height: 1.55; padding: 12px 16px; margin-top: 14px; background: var(--bg); }
body.embed .pitch .kpi { padding: 16px 18px; }
body.embed .pitch .kpi .val { font-size: 30px; }
body.embed .pitch .kpi .lbl { font-size: 13px; }
body.embed .pitch .kpis { margin-bottom: 22px; }
@media (max-width: 700px) { body.embed .pitch section { padding: 14px 14px 16px; } body.embed .pitch h2 { font-size: 19px; } }
body.embed .tab { font-size: 15px; }
body.embed .table-scroll { max-height: none; }          /* оболочка тянет iframe под контент: один скролл страницы, таблица скроллится только вбок */
body.embed .pane[data-pane="monthly"] .table-scroll { max-height: calc(var(--pvh, 900px) - 240px); }   /* 40 строк: вертикальный и боковой скролл внутри таблицы, полоса прокрутки на самой таблице */
body.embed, body.embed html { overflow: hidden; }
.tabs .savestate { margin-left: auto; align-self: center; }
.summary.eq { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; }
@media (max-width: 1100px) { .summary.eq { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .summary.eq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.summary.eq .sumcard .val { font-size: 17px; }

td.hint { color: var(--tx-3); font-size: 12px; font-weight: 400; white-space: normal; }

.pitch details.xp summary { cursor: pointer; list-style: none; color: var(--blue); text-decoration: underline dotted; }
.pitch details.xp summary::-webkit-details-marker { display: none; }
.pitch details.xp[open] summary { text-decoration: none; }
.pitch details.xp div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--tx-2); margin-top: 3px; }
.pitch details.xp div span { color: var(--tx-3); }

.page-title { font-size: 20px; font-weight: 650; margin: 8px 0 12px; }
body.embed .page-title { margin-top: 4px; }

/* шапка таблиц Питча переносится на две строки, чтобы таблица влезала без ползунка */
.pitch thead th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.pitch .nums tbody td { white-space: nowrap; }
.pitch .nums th, .pitch .nums td { text-align: center; }
.pitch details.ip { display: inline-block; text-align: left; }
.pitch details.ip div { display: block; white-space: normal; max-width: 110px; }
.pitch details.ip div span { display: block; font-size: 11px; }
.card.res thead th, .card.res tbody td, .card.res .cell.num { text-align: center; }
.card.res tbody td.label { text-align: left; }
/* карточки сводки: подпись сверху в две строки, цифра у всех на одной линии снизу */
.sumcard { display: flex; flex-direction: column; }
.sumcard .lbl { align-items: flex-start; min-height: 2.6em; line-height: 1.3; }
.sumcard .lbl i { margin-top: 4px; flex: none; }
.sumcard .val { margin-top: auto; }
@media (min-width: 900px) { .summary:not(.eq):not(.two):not(.calc-k) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.summary.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; margin-top: auto; }
.grid2 { align-items: stretch; }
.grid2 > div:first-child { display: flex; flex-direction: column; }   /* карточки инвесторов прижаты к низу колонки, вровень с графиком */
.th-card { flex: 1; }   /* таблица границ растягивается по высоте, зазор до карточек инвесторов = 18px как везде */
.th-card thead th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
.th-card thead th.num, .th-card td .cell.num { padding-left: 6px; padding-right: 6px; }
.summary.two .sumcard .cnt { margin-top: 4px; font-size: 13px; color: var(--tx-2); }
.sumcard.placeholder { cursor: default; background: transparent; border-style: dashed; }
.sumcard.placeholder::before { display: none; }

/* деньги инвесторов: ширина колонок не зависит от длины чисел */
table.inv-money.years { table-layout: fixed; width: 100%; }
table.inv-money.years thead th:first-child { width: 34%; }
table.inv-money.months thead th.num { min-width: 112px; }
table.inv-money thead th:first-child { min-width: 240px; }
.pitch .nums td .sub { font-size: 11px; color: var(--tx-3); margin-top: 2px; white-space: nowrap; }

/* подсказки к колонкам таблицы по месяцам */
table.grid thead th .q { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; border: 1px solid var(--tx-3); color: var(--tx-3); font-size: 10px; font-weight: 600; cursor: help; vertical-align: middle; }
table.grid thead th:hover .q { color: var(--tx); border-color: var(--tx); }
details.how { margin: 12px 14px 14px; font-size: 13px; }
details.how summary { cursor: pointer; color: var(--blue); }
details.how dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; }
details.how dt { font-weight: 600; color: var(--tx); white-space: nowrap; }
details.how dd { margin: 0; color: var(--tx-2); line-height: 1.45; }

/* «!» в каждой ячейке таблицы по месяцам + всплывающее пояснение */
table.monthly tbody td[data-key], .calc-years tbody td[data-cx] { position: relative; cursor: help; }
table.monthly tbody td[data-key] > .cell, .calc-years tbody td[data-cx] > .cell { padding-right: 20px; }
table.monthly tbody td[data-key]::after, .calc-years tbody td[data-cx]::after { content: "!"; position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--tx-3); color: var(--tx-3); font-size: 9px; line-height: 10px; text-align: center; font-weight: 700; opacity: .7; pointer-events: none; }
table.monthly tbody td[data-key]:hover::after, .calc-years tbody td[data-cx]:hover::after { opacity: 1; color: var(--blue); border-color: var(--blue); }
.pop { position: fixed; z-index: 60; max-width: 420px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--bd-2); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 13px; line-height: 1.45; color: var(--tx); }
.pop b { display: block; margin-bottom: 4px; }
.pop div { color: var(--tx-2); }
.hscroll-top { overflow-x: auto; overflow-y: hidden; height: 14px; }
.hscroll-top > div { height: 1px; }

/* 07.09.2026: «!» у любой метрики (карточки, шапки таблиц, ввод, питч), фаза месяца, цели владельца */
.q { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; border: 1px solid var(--tx-3); color: var(--tx-3); font-size: 10px; font-weight: 700; cursor: pointer; vertical-align: middle; flex: none; line-height: 1; }
.q:hover, table.grid thead th:hover .q { color: var(--blue); border-color: var(--blue); }
.sumcard .lbl .sc { color: var(--tx-3); white-space: nowrap; }
.pitch .kpi .lbl .q, .pitch td .q { margin-left: 4px; }
table.grid tbody td.label .q { margin-left: 6px; }
select.cell.phase { width: 100%; min-width: 120px; height: 32px; border: 0; border-left: 2px solid var(--in-bd); background: var(--in-bg); color: var(--in-tx); font: inherit; font-weight: 550; padding: 0 8px; outline: none; border-radius: 0; cursor: pointer; }
select.cell.phase:focus { box-shadow: inset 0 0 0 1px var(--amber); }
.cell.ok { color: var(--green); font-weight: 600; } .cell.warn { color: var(--amber); font-weight: 600; }

/* 17.09.2026: «Просчёт инвестора» — колонка справа на «Сводке»; на узком экране встаёт первой */
.pane.with-side:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 18px; align-items: start; }
.side-main { min-width: 0; }
@media (max-width: 1180px) { .pane.with-side:not([hidden]) { grid-template-columns: minmax(0, 1fr); } .calc-card { order: -1; } }
.calc-card { margin-bottom: 18px; }
.calc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0 14px; padding-right: 14px; border-bottom: 1px solid var(--bd); }
.calc-head h2 { flex: 1 1 360px; border-bottom: 0; }
.calc-form { display: flex; align-items: center; gap: 22px; padding: 8px 0; margin-left: auto; }
.calc-field { display: flex; align-items: center; gap: 10px; min-width: 0; }
.calc-cap { font-size: 12px; color: var(--tx-2); display: flex; align-items: center; white-space: nowrap; }
.calc-field input.cell { height: 30px; padding: 0 10px; font-size: 14px; min-width: 0; width: 96px; }
.calc-field:last-child input.cell { width: 130px; }
.calc-say { margin: 10px 14px 12px; font-size: 14px; line-height: 1.5; color: var(--tx-2); }
.calc-say b { color: var(--tx); font-weight: 650; white-space: nowrap; }
.summary.calc-k { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 14px; margin-bottom: 6px; }
.summary.calc-k .sumcard { cursor: default; }
.summary.calc-k .sumcard:hover { background: var(--panel); }
@media (min-width: 1100px) {   /* своя вкладка во всю ширину окна: карточки в ряд, подписи таблиц не растягиваются */
  .summary.calc-k { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calc-card table.grid thead th:first-child { width: 28%; }
}
.summary.calc-k .sumcard .lbl { min-height: 0; }
.calc-sub { font-size: 12px; color: var(--tx-2); text-transform: uppercase; letter-spacing: .3px; padding: 14px 14px 6px; display: flex; align-items: center; }
.calc-card table.grid { width: 100%; }
.calc-card table.grid thead th:first-child { width: 42%; }
.calc-card table.grid tbody td.label { white-space: normal; }
.calc-scen tbody tr { cursor: pointer; }
.calc-chart { padding: 4px 14px 6px; }
.calc-chart svg { height: auto; }
.calc-goal { display: inline-block; width: 14px; border-top: 1px dashed var(--tx-3); margin-right: 6px; vertical-align: middle; }
@media (max-width: 520px) { .calc-form { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 0 12px 14px; } .calc-field { justify-content: space-between; } }
.calc-card .chart-legend { flex-wrap: wrap; gap: 6px 14px; }
.calc-card .chart-legend span { white-space: nowrap; }

/* калькулятор инвестора: колонка «Итого за все годы» */
.calc-years th.tot, .calc-years td.tot { border-left: 2px solid var(--bd-2); }
.calc-years th.tot { color: var(--tx); white-space: nowrap; }

.pop strong { color: var(--tx); font-weight: 650; white-space: nowrap; }
.card.res table { width: 100%; min-width: 940px; table-layout: fixed; }
.card.res thead th:first-child { width: 12%; }
@media (max-width: 1200px) { .card.res table { font-size: 12px; } .card.res tbody td { padding: 7px 3px; } .card.res .cell { padding-left: 2px; padding-right: 2px; } .card.res thead th { padding-left: 4px; padding-right: 4px; } }

/* окно пароля вкладки «Инвесторы» — на базе .pop, input.cell и .fchip */
.lockbg { position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pop.lock { position: static; width: 300px; max-width: 100%; padding: 14px 16px; }
.lock input.cell { margin: 10px 0 4px; height: 36px; padding: 0 10px; font-size: 16px; letter-spacing: .25em; min-width: 0; }
.lock .err { color: var(--red); font-size: 12px; min-height: 16px; }
.lock .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.pane-inputs #tab-model > .mtoolbar > .fchip { display: none; }
