/* ===== Кухня инвестора в стиле новой главной (r668). Нужен nh.css ===== */
.kit { padding-bottom: 40px; }
.kit a { color: inherit; }
.kit .nh-wrap { max-width: 1220px; }

/* первый экран */
.kh-hero .nh-wrap { grid-template-columns: 1fr 440px; align-items: center; gap: 40px; }
.kh-hero .nh-hero-l { padding: 54px 0 56px; }
.kh-hero h1 { font-size: 42px; max-width: 640px; }
.kh-hero .nh-lead { margin-top: 22px; max-width: 600px; }
.kh-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 34px; }
.kh-cta .nh-btn { height: 52px; padding: 0 28px; }
.kh-hint { font-size: 14px; color: var(--mut); }
.kh-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kh-kpi:empty { display: none; }
.kh-tile { background: var(--card); border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 35, 80, .06); padding: 20px 22px; min-width: 0; }
.kh-tile b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--blue); line-height: 1.1; }
.kh-tile span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--mut); }

/* тело */
.kh-main { padding-top: 28px; }
.kh-note { font-size: 14px; color: var(--mut); line-height: 1.5; margin: 0 0 18px 4px; }
.kh-note:empty { display: none; }
.kh-note b { color: var(--ink); }
.ksec { margin-top: 44px; }
.ksec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ksec-h .t { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.ksec-h .s { font-size: 14px; color: var(--mut); }
.ksec-h .r { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kh-disc { font-size: 12.5px; color: var(--mut); margin-top: 18px; line-height: 1.5; }

/* фильтры-таблетки */
.kchips { display: flex; gap: 6px; flex-wrap: wrap; }
.kit .cchip { border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.2; transition: background .15s, color .15s, border-color .15s; text-decoration: none; display: inline-flex; align-items: center; }
.kit .cchip:hover { border-color: var(--blue); color: var(--blue); }
.kit .cchip.cchip-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ksel { border: 1px solid var(--line); border-radius: 999px; padding: 7px 30px 7px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--txt); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a97a8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; -webkit-appearance: none; appearance: none; cursor: pointer; }

/* карточки */
.kc { background: var(--card); border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 35, 80, .06); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; min-width: 0; }
a.kc:hover { box-shadow: 0 16px 40px rgba(15, 35, 80, .12); transform: translateY(-2px); }
.kcard { padding: 20px 22px 16px; gap: 12px; }
.kcard.mine { box-shadow: 0 0 0 2px var(--blue), 0 10px 30px rgba(15, 35, 80, .06); }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.kgrid-demo { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.kempty { grid-column: 1 / -1; padding: 22px; font-size: 14px; line-height: 1.5; color: var(--mut); }
.k-top { display: flex; align-items: center; gap: 10px; }
.k-top .av { width: 56px; height: 56px; border-radius: 14px; flex: none; object-fit: cover; background: #eef3ff; }
.k-who { flex: 1; min-width: 0; }
.k-aline { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.k-aline img { flex: none; object-fit: cover; background: #eef3ff; }
.cauthor { font-weight: 700; font-size: 13.5px; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cauthor:hover { color: var(--blue); }
.k-sub { font-size: 12px; color: var(--mut); margin-top: 3px; }
.k-tag { font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 7px; flex: none; }
.k-tag.mine { color: var(--blue); background: #eaf1ff; }
.k-tag.demo { color: var(--mut); background: #f2f5f9; font-weight: 600; }
.kpill { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.k-title { font-weight: 800; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.kquote { position: relative; font-size: 14px; color: var(--txt); line-height: 1.55; background: var(--bg2); border-radius: 12px; padding: 12px 14px 12px 34px; }
.kq-text { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.kq-mark { position: absolute; left: 12px; top: 4px; font-size: 30px; line-height: 1; color: #c2cbe0; font-family: Georgia, serif; }
.k-nodescr { font-size: 13px; color: var(--mut); font-style: italic; }
.k-nodescr a, .k-nodescr span { color: var(--blue); }
.k-metrics { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.k-m { min-width: 0; }
.k-m i { display: block; font-style: normal; font-size: 11px; color: var(--mut); white-space: nowrap; }
.k-m b { display: block; font-weight: 700; font-size: 17px; white-space: nowrap; color: var(--ink); }
.k-m b small { font-size: 11px; color: var(--mut); font-weight: 500; }
.up { color: #16a34a !important; } .dn { color: #dc2626 !important; }
.k-hid { color: var(--mut) !important; font-weight: 500 !important; font-size: 14px !important; }
.k-spark { margin: 0 -4px; }
.k-tickers { display: flex; flex-wrap: wrap; gap: 4px; }
.k-tickers span { font-size: 11px; font-weight: 600; color: var(--txt); background: var(--bg2); border-radius: 6px; padding: 2px 7px; }
.k-tickers em { font-style: normal; font-size: 11px; color: var(--mut); padding: 2px 4px; }
.k-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--mut); border-top: 1px solid var(--line); padding-top: 10px; }
.k-foot .l { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.k-foot .r { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.k-foot .r > span { display: inline-flex; align-items: center; gap: 4px; }
.k-bar { width: 70px; height: 6px; background: var(--bg2); border-radius: 4px; overflow: hidden; flex: none; }
.k-bar span { display: block; height: 100%; }
.k-foot .txt { white-space: nowrap; }

/* портфель недели */
.khero { display: grid; grid-template-columns: 1.1fr 1fr; padding: 0; overflow: hidden; color: #fff; }
.khero-l { padding: 28px 30px; display: flex; flex-direction: column; gap: 14px; min-width: 0; background: linear-gradient(135deg, #0b1a33 0%, #17306b 60%, #1d4ed8 130%); color: #fff; }
.khero-k { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.khero-k .lab { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.khero-k .kpill { background: rgba(255, 255, 255, .16); color: #fff; }
.khero-t { font-size: 30px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; color: #fff; }
.khero-a { display: flex; align-items: center; gap: 12px; }
.khero-a img { width: 56px; height: 56px; border-radius: 14px; flex: none; object-fit: cover; background: rgba(255, 255, 255, .1); }
.khero-a b { display: block; font-weight: 700; font-size: 15px; color: #fff; }
.khero-a span { display: block; font-size: 12px; color: rgba(255, 255, 255, .6); }
.khero-d { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .88); border-left: 2px solid rgba(255, 255, 255, .3); padding-left: 14px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.khero-m { display: flex; gap: 26px; flex-wrap: wrap; margin-top: auto; }
.khero-m i { display: block; font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .6); }
.khero-m b { display: block; font-weight: 800; font-size: 22px; letter-spacing: -.01em; color: #fff; }
.khero-m b.up { color: #4ade80 !important; } .khero-m b.dn { color: #f87171 !important; }
.khero-m b.k-hid { color: rgba(255, 255, 255, .55) !important; font-size: 15px !important; }
.khero-btn { align-self: flex-start; background: #fff; color: #0b1a33; border-radius: 12px; padding: 12px 20px; font-weight: 700; font-size: 14px; margin-top: 4px; }
.khero-r { background: var(--card); color: var(--ink); display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.khero-rh { padding: 18px 22px 0; display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); }
.khero-rh .r { display: inline-flex; gap: 10px; white-space: nowrap; flex: none; align-items: center; }
.khero-rh .r > span { display: inline-flex; align-items: center; gap: 4px; }

/* полки */
.kshelf-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.kshelf-row::-webkit-scrollbar { height: 6px; } .kshelf-row::-webkit-scrollbar-thumb { background: #dfe4ea; border-radius: 3px; }
.kshelf { padding: 16px 18px 14px; gap: 10px; width: 290px; flex: none; scroll-snap-align: start; }
.kshelf .k-title { font-size: 16px; height: 40px; overflow: hidden; }
.kshelf-big { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.kshelf-big i { display: block; font-style: normal; font-size: 11px; color: var(--mut); }
.kshelf-big b { display: inline-flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.kshelf-big b small { font-size: 13px; color: var(--mut); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.kshelf-big .sp { width: 110px; flex: none; }
.kshelf .k-tk { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kshelf .k-foot { justify-content: flex-end; padding-top: 8px; }

/* готовые стратегии */
.kdemo { padding: 16px 18px; gap: 8px; }
.kdemo .k-title { font-size: 15px; }
.kdemo .d { font-size: 12.5px; color: var(--mut); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kdemo .m { display: flex; gap: 14px; font-size: 12px; color: var(--mut); margin-top: auto; flex-wrap: wrap; }
.kdemo .m b { color: var(--ink); }

/* читальня */
.kart { padding: 0; overflow: hidden; width: 320px; flex: none; scroll-snap-align: start; }
.kart-row { scroll-snap-type: x mandatory; }
.krow-wrap { position: relative; }
.knav-btn { position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: 0 8px 24px rgba(15, 35, 80, .18); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s, transform .15s, opacity .15s; }
.knav-btn svg { width: 24px; height: 24px; }
.knav-btn.prev { left: -22px; } .knav-btn.next { right: -22px; }
.knav-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.06); }
.knav-btn:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 1300px) { .knav-btn.prev { left: 4px; } .knav-btn.next { right: 4px; } }
@media (max-width: 600px) { .knav-btn { width: 40px; height: 40px; margin-top: -26px; } .knav-btn svg { width: 20px; height: 20px; } .kart { width: 280px; } }

.kart .cov { aspect-ratio: 16 / 9; background: var(--bg2) center / cover no-repeat; }
.kart .cov.ph { background: linear-gradient(135deg, #e8efff, #f6f0ff); display: flex; align-items: center; justify-content: center; color: #c2cbe0; font-size: 34px; font-weight: 800; }
.kart .bd { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kart .k-title { font-size: 16px; line-height: 1.3; }
.kart .ex { font-size: 13px; color: var(--mut); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kart .au { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 12px; color: var(--mut); flex-wrap: wrap; }
.kart .au img { object-fit: cover; }
.kart .au b { color: var(--ink); font-weight: 600; }

/* лента событий (строки рисует comm-feed.js) */
.ktape { padding: 12px 18px 10px; margin-bottom: 18px; }
.ktape-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ktape-h .lab { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
.ktape-h .sub { font-size: 12px; color: var(--mut); }
.ktape-h .cchip { margin-left: auto; font-size: 12px; padding: 5px 12px; }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: kpulse 2s infinite; flex: none; }
@keyframes kpulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
#kFeedFull { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.ktape-f { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--mut); }
.kev:first-child { border-top: none !important; }
a.kev:hover { background: var(--bg2); margin: 0 -10px; padding-left: 10px !important; padding-right: 10px !important; border-radius: 10px; }
.kline { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); min-width: 0; }
.kline:first-child { border-top: none; }
.kline:hover .kl-t { color: var(--blue); }
.kline .kl-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kline .kl-s { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.kline .kl-d { flex: none; font-size: 11px; color: var(--mut); min-width: 52px; text-align: right; }
body.vv-guest .vv-auth-only { display: none !important; }

/* мобильные */
@media (max-width: 900px) {
  .kh-hero .nh-wrap { grid-template-columns: 1fr; gap: 22px; }
  .kh-hero .nh-hero-l { padding: 40px 0 0; }
  .kh-hero h1 { font-size: 34px; }
  .kh-kpi { padding-bottom: 36px; }
  .khero { grid-template-columns: 1fr; }
  .khero-r > svg, .khero-r > div[style*="height:230px"] { height: 150px !important; }
}
@media (max-width: 600px) {
  .kh-hero .nh-hero-l { padding-top: 30px; }
  .kh-hero h1 { font-size: 28px; }
  .kh-cta .nh-btn { width: 100%; }
  .kh-tile { padding: 16px; border-radius: 14px; }
  .kh-tile b { font-size: 24px; }
  .ksec { margin-top: 34px; }
  .ksec-h .t { font-size: 22px; }
  .ksec-h .r { margin-left: 0; width: 100%; }
  .khero-l { padding: 22px 20px; }
  .khero-t { font-size: 24px; }
  .kcard { padding: 16px 16px 14px; }
  .kgrid, .kgrid-demo { grid-template-columns: 1fr; }
  .kline .kl-d { min-width: 0; }
}

/* тёмная тема */
html[data-theme="dark"] .kh-tile, html[data-theme="dark"] .kc { box-shadow: none; border: 1px solid #2c2e33; }
html[data-theme="dark"] a.kc:hover { box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .kcard.mine { box-shadow: 0 0 0 2px #2563eb; }
html[data-theme="dark"] .kh-tile b { color: #7aa7ff; }
html[data-theme="dark"] .k-tag.mine { background: #222429; color: #7aa7ff; }
html[data-theme="dark"] .k-tag.demo { background: #212328; }
html[data-theme="dark"] .kq-mark { color: #3a4a66; }
html[data-theme="dark"] .up, html[data-theme="dark"] .k-m b.up { color: #4ade80 !important; }
html[data-theme="dark"] .dn, html[data-theme="dark"] .k-m b.dn { color: #f87171 !important; }
html[data-theme="dark"] .khero-l { border: none; }
html[data-theme="dark"] .khero-btn { background: #f1f2f4; color: #0b1a33; }
html[data-theme="dark"] .kshelf-row::-webkit-scrollbar-thumb { background: #34373d; }
html[data-theme="dark"] .kart .cov.ph { background: linear-gradient(135deg, #222429, #1c1e23); color: #3a4a66; }
html[data-theme="dark"] .kit .cchip { background: #1b1c20; border-color: #2c2e33; color: #c3cde0; }
html[data-theme="dark"] .kit .cchip.cchip-on { background: #2563eb; border-color: #2563eb; color: #fff; }
html[data-theme="dark"] .ksel { background-color: #1b1c20; border-color: #2c2e33; color: #c3cde0; }
html[data-theme="dark"] .ksel option { background: #1b1c20; }
html[data-theme="dark"] .k-nodescr a, html[data-theme="dark"] .k-nodescr span, html[data-theme="dark"] .cauthor:hover, html[data-theme="dark"] .kline:hover .kl-t { color: #7aa7ff; }
html[data-theme="dark"] .kline .kl-s[style*="#0b1a33"], html[data-theme="dark"] .kev [style*="color:#0b1a33"], html[data-theme="dark"] .kev [style*="color:#41506b"] { color: #f1f2f4 !important; }
html[data-theme="dark"] .kev [style*="color:#5b6a7d"] { color: #9a9da5 !important; }
html[data-theme="dark"] .kart .cov { background-color: #212328; }
html[data-theme="dark"] .k-top .av, html[data-theme="dark"] .k-aline img { background: #212328; }
html[data-theme="dark"] .kit .nh-btn-p, html[data-theme="dark"] .kit .nh-btn-p:hover { color: #fff !important; }
html[data-theme="dark"] .kit a.kc, html[data-theme="dark"] .kit a.kline, html[data-theme="dark"] .kit a.kev, html[data-theme="dark"] .kit .kline .kl-t { color: #f1f2f4; }
html[data-theme="dark"] .kit a.kline:hover .kl-t { color: #7aa7ff; }
html[data-theme="dark"] .kit .cchip.cchip-on { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
html[data-theme="dark"] .knav-btn { background: #212328; border-color: #34373d; color: #f1f2f4; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .knav-btn:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
