/* ============================================================
   Толк — дизайн-язык «Наверстая» (перенос 2026-07-27).
   Подключается ПОСЛЕ app.css, поэтому переопределяет точечно:
   шрифт Golos Text, тёмная палитра как в кабинете, радиусы,
   карточки без теней с волосяной рамкой, пилюли-чипы, сайдбар.
   Светлая тема Толка остаётся рабочей — правим только токены.
   ============================================================ */

/* --- Golos Text: тот же self-hosted шрифт, что в Наверстае --- */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/golos/cyr-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/golos/cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/golos/lat-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/golos/lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body,
button,
input,
select,
textarea {
  font-family: 'Golos Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
}

/* --- палитра: ровно токены кабинета Наверстая --- */
[data-theme='dark'] {
  --bg: #14161d;
  --surface: #1c1f27;
  --surface-2: #222633;
  --edge: #2c3140;
  --hairline: #262b38;
  --ink: #eef0f6;
  --ink-2: #aab3c7;
  --mute: #6f7891;
  --accent: #6b8bfa;
  --accent-dim: rgba(107, 139, 250, 0.14);
  --cta: #4fae4e;
  --cta-hover: #5abf59;
  --green: #4fae4e;
  --green-dim: rgba(79, 174, 78, 0.15);
  --amber: #e2a94e;
  --amber-dim: rgba(226, 169, 78, 0.14);
  --red: #f0655f;
  --red-dim: rgba(240, 101, 95, 0.14);
  --sb-bg: var(--surface);
  --hover-soft: rgba(255, 255, 255, 0.06);
  --row-hover: rgba(255, 255, 255, 0.035);
  --chip-on-border: rgba(107, 139, 250, 0.45);
  --ghost-hover-border: #434b5e;
  /* карточки в кабинете держатся на рамке, а не на тени */
  --shadow-card: none;
  --shadow-pill: none;
  --chart-fill: rgba(107, 139, 250, 0.13);
  --chart-bar: rgba(107, 139, 250, 0.55);
  --r: 16px;
}

:root {
  --r: 16px;
  --shadow-card: 0 1px 2px rgba(41, 46, 61, 0.04);
  --cta: #4fae4e;
  --cta-hover: #43a047;
  --green: #3d8c3c;
}

/* --- геометрия: те же радиусы, что в кабинете --- */
.card,
.kpi,
.funnel,
.tscroll {
  border-radius: 16px;
}
.btn {
  border-radius: 11px;
  font-weight: 600;
}
.btn.sm {
  border-radius: 9px;
}
.chip,
.pill {
  border-radius: 999px;
  font-weight: 600;
}
.pill {
  padding: 3px 10px;
  font-size: 11.5px;
}

/* --- сайдбар: пункт-пилюля с мягкой подсветкой, как в кабинете --- */
.nav a,
.nav .item,
.side a {
  border-radius: 10px;
}
.nav a.active,
.nav .item.active,
.side a.active {
  background: var(--accent-dim);
  color: var(--ink);
}

/* --- заголовки: плотнее и жирнее, как в Наверстае --- */
h1,
h2,
.hero h1,
.hero h2 {
  letter-spacing: -0.01em;
  font-weight: 700;
}
.hero h1 {
  line-height: 1.2;
}

/* --- надпись-эйбрау: янтарный капс с точкой (фирменный приём) --- */
.eyebrow,
.hero .status {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
}

/* --- таблицы и строки: волосяные разделители, ховер как в кабинете --- */
table th {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}
tbody tr:hover {
  background: var(--row-hover);
}

/* --- скроллбары: тонкие светлые, как в тёмном кабинете --- */
[data-theme='dark'] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
[data-theme='dark'] ::-webkit-scrollbar-track {
  background: transparent;
}
[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
  background-clip: content-box;
  border: 3px solid transparent;
}

/* --- ширина как в кабинете: контент занимает экран, а не жмётся
       в колонку посреди пустоты (правка 2026-07-27) --- */
main {
  max-width: 1560px;
  margin-inline: auto;
  padding: 28px clamp(16px, 2.6vw, 44px) 84px;
}
@media (max-width: 820px) {
  main { padding: 18px 16px 60px; }
}

/* ============================================================
   Главная в композиции «Наверстая» (2026-07-27).
   Герой с выводом и колонкой «сегодня», полоса цифр,
   две колонки «разбор / план». Классы с префиксом nvh-,
   старые блоки Толка не трогаем.
   ============================================================ */

/* — герой — */
.nvh-hero {
  display: grid;
  gap: 26px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  padding: 24px 28px 26px;
  margin-bottom: 14px;
}
.nvh-hero > * {
  min-width: 0;
}
@media (min-width: 1080px) {
  .nvh-hero {
    grid-template-columns: minmax(0, 1fr) minmax(272px, 336px);
  }
  .nvh-side {
    border-left: 1px solid var(--hairline);
    padding-left: 26px;
  }
}
.nvh-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.nvh-eyebrow .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}
h2.nvh-h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 11px;
  max-width: 30ch;
  text-wrap: balance;
}
h2.nvh-h1 .loss {
  color: var(--red);
}
.nvh-sub {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 62ch;
}
.nvh-sub b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nvh-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* — колонка «сегодня» — */
.nvh-side-t {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 6px;
}
.nvh-line {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 11px 0;
  border: 0;
  border-top: 1px solid var(--hairline);
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.nvh-line.static {
  cursor: default;
}
.nvh-line .dt {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  margin-top: 6px;
  background: var(--mute);
}
.nvh-line .dt.r {
  background: var(--red);
}
.nvh-line .dt.a {
  background: var(--amber);
}
.nvh-line .dt.g {
  background: var(--green);
}
.nvh-line .tx {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}
.nvh-line .tx small {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mute);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.nvh-line .chev {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 3px;
  stroke: var(--mute);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nvh-line:not(.static):hover .tx {
  color: var(--accent);
}
.nvh-line:not(.static):hover .chev {
  stroke: var(--accent);
}

/* — полоса цифр — */
.nvh-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 14px;
}
.nvh-cell {
  padding: 15px 22px 15px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  min-width: 0;
}
.nvh-cell:nth-child(2n) {
  border-right: 0;
}
.nvh-cell:nth-child(n + 3) {
  border-bottom: 0;
}
@media (min-width: 860px) {
  .nvh-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .nvh-cell {
    border-bottom: 0;
    border-right: 1px solid var(--hairline);
  }
  .nvh-cell:last-child {
    border-right: 0;
  }
}
.nvh-cell .v {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.nvh-cell .v small {
  font-size: 0.58em;
  color: var(--ink-2);
  font-weight: 600;
}
.nvh-cell .v .up {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0;
  margin-left: 8px;
  white-space: nowrap;
}
.nvh-cell .l {
  font-size: 12.5px;
  color: var(--mute);
  line-height: 1.45;
  margin-top: 3px;
}
.nvh-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--hover-soft);
  overflow: hidden;
  margin-top: 8px;
  max-width: 170px;
}
.nvh-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--mute);
}
.nvh-bar.r i {
  background: var(--red);
}
.nvh-bar.g i {
  background: var(--green);
}

/* — две колонки — */
.nvh-two {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 14px;
  align-items: start;
}
.nvh-two > * {
  min-width: 0;
}
@media (min-width: 1080px) {
  .nvh-two {
    grid-template-columns: 1.18fr minmax(0, 1fr);
  }
}

/* — план действий — */
.nvh-plan {
  padding: 17px 22px 8px;
}
.nvh-sec {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 3px;
}
.nvh-sec .cnt {
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--red-dim);
  color: var(--red);
}
.nvh-note {
  font-size: 12.5px;
  color: var(--mute);
  margin: 0 0 4px;
}
.nvh-step {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
}
.nvh-step .n {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--red-dim);
  color: var(--red);
}
.nvh-step.a .n {
  background: var(--amber-dim);
  color: var(--amber);
}
.nvh-step .b {
  min-width: 0;
}
.nvh-step .t {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 5px;
}
.nvh-step p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
.nvh-step p b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nvh-step .k {
  color: var(--mute);
  font-weight: 600;
}
.nvh-step p.eff {
  color: var(--green);
  font-weight: 600;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .nvh-hero {
    padding: 20px 18px 22px;
  }
  h2.nvh-h1 {
    font-size: 22px;
  }
  .nvh-cell {
    padding: 13px 16px;
  }
  .nvh-plan {
    padding: 15px 18px 6px;
  }
}

/* — упсел «Разбор»: на узком стек, кнопка во всю ширину — */
.upsell {
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .upsell {
    align-items: flex-start;
    gap: 12px;
  }
  .upsell .ub {
    flex: 1 1 100%;
    order: 2;
  }
  .upsell .btn {
    flex: 1 1 100%;
    order: 3;
  }
}

/* — герои «Маркетинга» и «Продаж» приводим к типографике главной — */
.hero,
.verdict {
  padding: 24px 28px 24px;
}
.hero h2,
.verdict h2 {
  font-size: 26px;
  letter-spacing: -0.015em;
  max-width: 30ch;
}
.hero .status,
.verdict .status {
  font-size: 11px;
  letter-spacing: 0.18em;
  gap: 9px;
  margin-bottom: 14px;
}
.hero .status .d,
.verdict .status .d {
  width: 6px;
  height: 6px;
}
.hero .sub,
.verdict p {
  font-size: 14.5px;
  margin-top: 12px;
}
