/* ================= ЛК · ИДЕИ (FR-753) ================= */
/* Раздел визуально согласован со «Стратегиями»: те же .card, .statcard,
   .mini-stat, .seg, .disclaimer из tokens.css / app.css / strategies.css.
   Здесь — только то, чего у «Стратегий» нет: срок актуальности, приглушённая
   историческая карточка и рендер research-отчёта блоками. */

/* --- переключатель «Текущие идеи / История идей» --- */
.idea-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 18px; }
.idea-seg { flex-wrap: wrap; }
.idea-filter-note { font-size: 13px; margin-left: auto; }
@media (max-width: 680px) { .idea-filter-note { margin-left: 0; } }

/* --- каталог карточек: та же сетка, что у .strat-list --- */
.idea-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 1150px) { .idea-list { grid-template-columns: 1fr; } }

.idea-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.idea-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.idea-tag { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 3px 8px; }
.idea-name { font-size: 19px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.idea-thesis { margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }

/* Срок актуальности — всегда на виду: у идеи он и есть главное отличие от
   стратегии, которая подключается бессрочно. */
.idea-exp { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.idea-card.is-archived .idea-exp { color: var(--muted); }

.idea-mini { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 2px; }
.idea-tickers { display: flex; gap: 6px; flex-wrap: wrap; }
.idea-tickers .chip { font-family: var(--mono); font-size: 11.5px; }
.idea-more { color: var(--muted); }

.idea-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.idea-dates { font-size: 13px; font-family: var(--mono); }
.idea-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.idea-actions .btn { flex: 1 1 auto; min-width: 128px; justify-content: center; }

/* hover — тот же эффект, что у карточек стратегий */
.idea-list .idea-card { transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease, background .2s ease; }
.idea-list .idea-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface));
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) { .idea-list .idea-card:hover { transform: none; } }

/* Историческая идея не должна читаться как действующее предложение: приглушённый
   фон, сниженная контрастность и полоса слева вместо акцента. */
.idea-card.is-archived { background: var(--bg); border-style: dashed; }
.idea-card.is-archived .idea-name,
.idea-card.is-archived .idea-mini,
.idea-card.is-archived .idea-tickers { opacity: .72; }
.idea-list .idea-card.is-archived:hover { background: var(--bg); border-color: var(--line); transform: none; box-shadow: none; }

/* --- страница разбора --- */
.idea-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.idea-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.idea-back { cursor: pointer; }
.idea-pdf { text-decoration: none; }

.idea-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.idea-hero-main { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.idea-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.idea-hero-main .idea-name { font-size: 24px; }
.idea-hero-dates { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
/* Горизонт и уверенность: развёрнутые формулировки отчёта, поэтому строкой
   «ярлык — текст», а не чипом. */
.idea-hero-facts { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.idea-fact { font-size: 13px; line-height: 1.5; }
.idea-fact b { font-weight: 600; margin-right: 8px; }
.idea-fact span { color: var(--muted); }
.idea-hero-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.idea-hero-cta .btn { min-width: 168px; justify-content: center; }
.idea-err { color: var(--neg); font-size: 13px; min-height: 0; }
@media (max-width: 680px) {
  .idea-hero { flex-direction: column; }
  .idea-hero-cta { align-items: stretch; width: 100%; }
}

.idea-archived-note { background: rgba(120, 120, 120, .09); }
/* Значок отделяется от текста отступом, а не пробелом в разметке: пробел рядом
   со знаком препинания браузер схлопывает. */
.idea-detail .disclaimer b { margin-right: 6px; }
.idea-metrics { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .idea-metrics { grid-template-columns: 1fr; } }

/* --- структурированные тезисы, катализаторы, риски --- */
.idea-prose { display: flex; flex-direction: column; gap: 14px; }
.idea-block h5 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.idea-block .prose { white-space: pre-line; }
/* Катализаторы и риски различимы цветом полосы: «что сыграет за» и «что против»
   не должны выглядеть одинаково. */
.idea-prose.is-cat .idea-block { border-left: 3px solid var(--pos); padding-left: 12px; }
.idea-prose.is-risk .idea-block { border-left: 3px solid var(--neg); padding-left: 12px; }

.idea-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; }

/* --- таблицы (инструменты, показатели, аналоги, DCF) --- */
.idea-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.idea-tbl { width: 100%; border-collapse: collapse; }
.idea-tbl th, .idea-tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: top; }
.idea-tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.idea-tbl td.num, .idea-tbl th.num { text-align: right; font-family: var(--mono); }
.idea-tbl td.mono { font-family: var(--mono); font-weight: 600; }

/* --- разбор по бумагам --- */
.idea-companies { display: flex; flex-direction: column; }
.idea-co { border-bottom: 1px solid var(--line); padding: 4px 0; }
.idea-co:last-child { border-bottom: none; }
.idea-co > summary { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.idea-co > summary::-webkit-details-marker { display: none; }
.idea-co > summary:after { content: "＋"; margin-left: auto; font-size: 12px; color: var(--accent); }
.idea-co[open] > summary:after { content: "－"; }
.idea-co-tk { font-size: 15px; font-weight: 700; }
.idea-co-nm { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.idea-co-sec { padding: 0 0 12px; }
.idea-co-sec h5 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.idea-co-sec.is-cat h5 { color: var(--pos); }
.idea-co-sec.is-risk h5 { color: var(--neg); }

/* --- полный research-отчёт блоками --- */
.ia-doc { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ia-h2 { margin: 18px 0 0; font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ia-h2:first-child { margin-top: 0; }
.ia-h3 { margin: 10px 0 0; font-size: 14px; color: var(--accent); text-transform: none; letter-spacing: 0; }
.ia-p { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ia-note { font-size: 12.5px; line-height: 1.5; color: var(--muted); background: rgba(192, 138, 62, .07); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.ia-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.55; }
.ia-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ia-kpi-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); padding: 9px 12px; }
.ia-kpi-item b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.ia-kpi-item span { font-family: var(--mono); font-size: 14px; }
.ia-tbl td { font-family: var(--mono); font-size: 12.5px; }
.ia-tbl td:first-child { font-family: var(--sans); }
.ia-fig { margin: 0; }
.ia-chart { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.ia-fig figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* --- телефон --- */
@media (max-width: 520px) {
  .idea-card-foot { flex-direction: column; align-items: stretch; }
  .idea-actions { flex-direction: column; }
  .idea-actions .btn { min-width: 0; }
  .idea-exp { margin-left: 0; }
  .idea-mini { gap: 12px; }
  .idea-mini .mini-stat .value { font-size: 14px; }
  .ia-h2 { font-size: 15.5px; }
}
