/* news_v3.css — page-CSS для news_list_v3 / news_detail_v3 / narratives_list_v3 /
   narrative_detail_v3 (services/portal/templates/portal/*.html).

   Реєстр: services/portal/design-system/UI-KIT.md — усе, що там ЗНАЧИТЬСЯ
   готовим (ss-glass/ss-surface/ss-chip/ss-tag/ss-seg/ss-link/.lnk/_section_heading/
   _empty_state/_ai_verdict_chip/_trade_status_chip), СЮДИ НЕ дублюється — сторінки
   підключають ticker_v3.css поруч (UI-KIT.md "нові сторінки поки що підключають
   ticker_v3.css" — борг design-components.css ще не закритий), щоб узяти звідти
   .tv3-toast/.tv3-note/.tv3-group/.exp/.tv3-signal-lead-суміжні патерни.

   Тут — ЛИШЕ те, чого в реєстрі нема: фільтр-бар новин, пагінація, breadcrumb,
   стрічка новини (byline/share/sticky-nav/FAB), AI Talk Show (news-варіант з
   article_flow, відмінний від ticker talk show _ai_panel.html), лінійка
   життєвого циклу наративу. Кандидати у design-components позначені коментарем. */

/* ==================== Токени сторінки ====================
   Ревью-фікс (координатор, MINOR §7): #E0A85C був хардкоджений у 4 місцях
   (narratives_list_v3/narrative_detail_v3/news_detail_v3 inline-style +
   .nv3-stars нижче) — той самий "амбер" тон, що .ss-tag-amber/StatusChip
   warn-сусід у ticker_v3.css, але там він живе всередині класу, не токеном.
   Один var тут — джерело істини для інлайнових ужитків цієї групи сторінок. */
:root { --tag-amber: #E0A85C; }

/* ==================== Ticker pill (симвом-бейдж) ====================
   Ревью-фікс (координатор, MINOR §8): та сама тиха ss-num пігулка була
   інлайнена 5×(news_list_v3 картка, news_detail_v3 header/predictions/
   related-news, narrative_detail_v3 hypothesis ticker) — тепер один
   include portal/includes/_ticker_pill.html (symbol, href, compact),
   зареєстрований у design-system/UI-KIT.md. Кандидат у design-components:
   переюзний скрізь, де показуємо тікер поза таблицею/entity-посиланням. */
.nv3-ticker-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--text-2); }
.nv3-ticker-pill-sm { font-size: 10.5px; padding: 2px 6px; border-radius: 5px; }
a.nv3-ticker-pill:hover { color: var(--petrol-100); background: rgba(255, 255, 255, .11); }

/* ==================== Collapsible full-text block (Original Article / AI Overview) ====================
   Ревью-фікс (координатор, MAJOR §1): ОДНА копія повного тексту в DOM.
   news_detail_v3 "Full Article" — інший патерн (truncatewords_html-прев'ю
   ЗОВНІ + повний текст ОДИН раз у details, той самий на всіх брейкпойнтах,
   1:1 зі старою #article-text поведінкою). Цей клас — для
   narrative_detail_v3 AI Overview, де стара версія мала РІЗНУ поведінку
   mobile/desktop (max-h-24 lg:max-h-none): тут ОДНА копія тексту, а
   видимість керує CSS, не дублювання розмітки. .nv3-clamp усередині
   <details class="nv3-clamp-details"> примусово видима навіть у закритому
   стані (native UA-стиль ховає дітей details:not([open]) через display:none
   — author-правило регулярно перебиває UA origin, специфічність не при
   чому), max-height лише mobile-clamp; ≥1024 (той самий поріг, що
   старий lg:) — summary ховається, тіло завжди без обрізання. */
.nv3-clamp-details > .nv3-clamp { display: block; max-height: 6.6em; overflow: hidden; }
.nv3-clamp-details[open] > .nv3-clamp { max-height: none; overflow: visible; }
@media (min-width: 1024px) {
  .nv3-clamp-details > summary { display: none; }
  .nv3-clamp-details > .nv3-clamp { max-height: none; overflow: visible; }
}

/* ==================== 2-column article layout (news_detail) ====================
   Кандидат у design-components: main+aside 65/35 розкладка потрібна БУДЬ-ЯКій
   detail-сторінці з сайдбаром (narrative_detail теж використовує). Base
   (inline на елементі): display:grid;gap;margin-block-start — тут ЛИШЕ
   grid-template-columns по брейкпойнту (Закон №3: властивість, якою керує
   клас, ніколи не дублюється інлайном на цьому ж елементі). */
.nv3-2col { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .nv3-2col { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); } }
@media (min-width: 1600px) { .nv3-2col { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); } }

/* ==================== Filter bar (news_list) ====================
   Кандидат у design-components: той самий патерн (текст-поле + select +
   apply/reset пігулки) знадобиться catalogs_v3 (screener/stocks_catalog). */
.nv3-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.nv3-field { display: flex; align-items: center; gap: 8px; }
.nv3-field .ss-label { white-space: nowrap; }
.nv3-input, .nv3-select {
  border: 0; outline: 0; font: inherit; font-size: 12.5px; color: var(--text);
  background: rgba(255, 255, 255, .055); box-shadow: inset 1px 1px 0 rgba(214, 248, 255, .22);
  border-radius: var(--r-sm); padding: 8px 12px; font-family: var(--font);
}
.nv3-input { width: 112px; font-family: var(--mono); }
.nv3-input::placeholder { color: var(--text-faint); }
.nv3-input:focus, .nv3-select:focus { box-shadow: inset 1px 1px 0 rgba(214, 248, 255, .22), 0 0 0 2px rgba(63, 211, 232, .35); }
.nv3-select { max-width: 200px; }
.nv3-btn {
  border: 0; cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 9px 16px; border-radius: var(--r-pill); transition: background var(--react), color var(--react);
}
.nv3-btn-primary { background: var(--petrol-600); color: var(--text); }
.nv3-btn-primary:hover { background: var(--petrol-500); }
.nv3-btn-ghost { background: transparent; color: var(--text-3); padding-inline: 10px; }
.nv3-btn-ghost:hover { color: var(--text); }

/* ==================== Pagination (news_list / narratives_list) ====================
   Перенесено у design-system.css (реєстровий блок UI-KIT.md, глобальний —
   fund/institution/person_v3 теж споживають _pagination_v3.html, а вони НЕ
   підключають цей page-CSS). .nv3-pagenav/.nv3-pagelink/.is-disabled — там. */

/* ==================== Breadcrumb ====================
   Кандидат у design-components: та сама однорядкова хлібна крихта потрібна
   БУДЬ-ЯКій detail-сторінці (institution/fund/person вже мають щось схоже). */
.nv3-crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.nv3-crumb a { color: var(--text-3); }
.nv3-crumb a:hover { color: var(--petrol-100); }
.nv3-crumb span[aria-current] { color: var(--text); font-weight: 600; }

/* ==================== Article byline / meta (news_detail) ==================== */
.nv3-byline { font-size: 12.5px; color: var(--text-3); }
.nv3-byline a { color: var(--petrol-200); }
.nv3-stars { font-size: 11px; letter-spacing: 1px; }
.nv3-stars i { color: var(--text-faint); font-style: normal; }
.nv3-stars i.is-on { color: var(--tag-amber); }

/* ==================== Share (desktop dropdown + mobile FAB) ==================== */
.nv3-share { position: relative; }
.nv3-share-btn { border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); transition: color var(--react); font-family: var(--font); }
.nv3-share-btn:hover { color: var(--petrol-100); }
.nv3-share-menu { display: none; position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px); z-index: 30; width: 190px; padding: 6px; border-radius: 14px; }
.nv3-share-menu.is-open { display: block; }
.nv3-share-menu a, .nv3-share-menu button {
  display: block; width: 100%; text-align: start; border: 0; background: transparent; cursor: pointer;
  padding: 9px 10px; border-radius: 9px; font-size: 12.5px; color: var(--text-2); font-family: var(--font); transition: background var(--react), color var(--react);
}
.nv3-share-menu a:hover, .nv3-share-menu button:hover { background: rgba(255, 255, 255, .07); color: var(--text); }

.nv3-fab {
  position: fixed; inset-block-end: 22px; inset-inline-end: 18px; z-index: 55; width: 50px; height: 50px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center; color: var(--scene-4); background: var(--petrol-100);
  box-shadow: 0 18px 40px -14px rgba(63, 211, 232, .6), 0 8px 20px -6px rgba(0, 0, 0, .6);
}
@media (min-width: 768px) { .nv3-fab { display: none; } }

/* ==================== Sticky micro-nav (news_detail) ====================
   Кандидат у design-components: та сама секційна навігація стане у пригоді
   на будь-якій довгій detail-сторінці (institution/fund вже мають подібне
   у своїй легасі верстці). */
.nv3-stickynav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 45; transform: translateY(-100%); opacity: 0;
  transition: transform var(--react), opacity var(--react);
  background: rgba(6, 26, 34, .92); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-block-end: 1px solid var(--surface-border);
}
.nv3-stickynav.is-visible { transform: translateY(0); opacity: 1; }
.nv3-stickynav-inner { max-width: 1240px; margin-inline: auto; padding-inline: 16px; display: flex; align-items: center; gap: 4px; height: 44px; overflow-x: auto; }
@media (min-width: 768px) { .nv3-stickynav-inner { padding-inline: 24px; } }
.nv3-stickynav-inner::-webkit-scrollbar { display: none; }
.nv3-navlink { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; font-size: 12px; color: var(--text-3); white-space: nowrap; transition: background var(--react), color var(--react); }
.nv3-navlink:hover { color: var(--text); }
.nv3-navlink.is-active { color: var(--text); background: rgba(255, 255, 255, .08); }

/* ==================== AI Talk Show — news article_flow variant ====================
   Відмінний від ticker _ai_panel.html (той читає TickerTalkShow.models,
   цей — NewsArticle.article_flow discussion-блоки). Той самий візуальний
   словник (ss-inset ss-lift картки, ss-chip вердикт) свідомо повторений
   тут для консистентності, а не через include — інша форма даних. */
.nv3-modelgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.nv3-modelpill { display: flex; align-items: center; gap: 9px; }
.nv3-modelpill .av { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .09); color: var(--text-2); }

.nv3-thread { display: grid; gap: 12px; }
.nv3-thread-row { display: flex; gap: 12px; align-items: flex-start; }
.nv3-avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .09); color: var(--text-2); }
.nv3-bubble { flex: 1 1 auto; min-width: 0; border-radius: 14px; border-start-start-radius: 4px; }
.nv3-confbar { display: inline-flex; align-items: center; gap: 6px; }
.nv3-confbar-track { width: 44px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.nv3-confbar-fill { display: block; height: 100%; background: var(--petrol-100); }

/* ==================== Narrative lifecycle progress (narrative_detail) ====================
   Один фактор-бар замість 5 пофарбованих сегментів старої версії — той
   самий "трек+заливка" словник, що ss-ruler-track/fill (styles.css), лише
   горизонтальна пропорція = індекс фази, не ціна. Кандидат у design-
   components: institution/fund lifecycle-подібних станів поки нема, але
   параграф "прогрес по закритому словнику стадій" — переюзний патерн. */
.nv3-phase-track { position: relative; height: 8px; border-radius: 5px; background: linear-gradient(180deg, rgba(2, 14, 20, .5), rgba(255, 255, 255, .04)); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5); overflow: hidden; }
.nv3-phase-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 5px; background: linear-gradient(90deg, rgba(10, 67, 116, .6), var(--petrol-100)); box-shadow: 0 0 16px -4px rgba(63, 211, 232, .55); transition: width var(--in); }

/* ==================== Responsive touch-ups ==================== */
@media (max-width: 767px) {
  .nv3-filterbar { gap: 8px 10px; }
  .nv3-input { width: 96px; }
}
