/* ------------------------------------------------------------------
   Переработанные разделы страницы. Подключается последним, поэтому
   здесь же лежат окончательные размеры и цвета.

   Токены те же, что в Lexora/Sources/UI/DesignSystem.swift:
   Spacing 4/8/12/16/24/32, Radii.card 12, Radii.chip 8,
   карточка - белый 4,5 % с рамкой 8 %, вторичный текст - белый 56 %.
   ------------------------------------------------------------------ */

/* ==================================================================
   1. «Что можно делать»: рассказ слева, пара «сказано - вставлено»
   справа. Без вложенных карточек и кнопок - только суть.
   ================================================================== */
.usecases-section { padding-bottom: 96px; }
.uc-list { display: grid; counter-reset: uc; }
/* Три строки подряд читались одинаково - взгляду не за что зацепиться.
   Теперь у каждой свой цвет и крупный номер: цвет ведёт от заголовка
   к результату, номер держит порядок рассказа. */
.uc-row {
  --uc: #0a84ff;
  --uc-soft: #62aaff;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 32fr) minmax(0, 68fr);
  gap: 40px;
  align-items: start;
  counter-increment: uc;
  padding: 34px 0 34px 62px;
  border-top: 1px solid var(--ev-stroke);
}
.uc-row:nth-child(2) { --uc: #806bff; --uc-soft: #a898ff; }
.uc-row:nth-child(3) { --uc: #2bb8a3; --uc-soft: #5fd6c4; }
.uc-row::before {
  content: counter(uc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 34px;
  width: 40px;
  font-size: 30px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  color: var(--uc);
  opacity: .5;
}
.uc-row::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 74px;
  bottom: 34px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--uc), transparent);
  opacity: .45;
}
.uc-row:last-child { border-bottom: 1px solid var(--ev-stroke); }
.uc-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--uc-soft);
}
.uc-copy h3 { margin: 0; font-size: 25px; line-height: 1.16; letter-spacing: -.03em; font-weight: 700; }
.uc-copy > p:not(.uc-kicker) { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--ev-text-2); max-width: 34ch; }

.uc-demo { display: grid; gap: 10px; }
.uc-line {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 16px 18px;
  border-radius: var(--ev-r-card);
  background: var(--ev-fill-3);
  border: 1px solid var(--ev-stroke);
}
.uc-line-cap {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ev-text-3);
  white-space: nowrap;
}
.uc-line p { margin: 0; font-size: 15px; line-height: 1.55; }
.uc-line.said p { color: #9a9a9e; }
.uc-line.got {
  background: color-mix(in srgb, var(--uc) 9%, transparent);
  border-color: color-mix(in srgb, var(--uc) 32%, transparent);
}
.uc-line.got .uc-line-cap { color: var(--uc-soft); }
.uc-line.got p { color: var(--ev-text); }

@media (max-width: 900px) {
  .uc-row { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 0 28px 52px; }
  .uc-row::before { top: 28px; font-size: 26px; }
  .uc-row::after { top: 64px; bottom: 28px; }
  .uc-copy > p:not(.uc-kicker) { max-width: none; }
}
@media (max-width: 560px) {
  .uc-copy h3 { font-size: 21px; }
  .uc-line { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 13px 14px; }
  .uc-line p { font-size: 13.5px; }
}

/* ==================================================================
   2. «Больше чем диктовка»: три главных инструмента крупно, остальные
   шесть - компактным списком. Плоский список из девяти одинаковых
   пунктов не давал понять, с чего начинать; теперь есть иерархия.
   ================================================================== */
.features-section { background: #292929; border-block: 1px solid #3a3a3a; }

.cap-lead { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cap-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 26px 24px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, #333333, #2c2c2c);
  border: 1px solid #424242;
}
.cap-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.cap-mark.blue { background: rgba(10, 132, 255, .14); color: #4ba1ff; }
.cap-mark.indigo { background: rgba(128, 107, 255, .16); color: #9b8aff; }
.cap-mark.teal { background: rgba(64, 200, 224, .14); color: #5ad3e6; }
.cap-card h3 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; font-weight: 650; }
.cap-card > p { margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--ev-text-2); }
.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  padding: 15px 0 0;
  list-style: none;
  border-top: 1px solid #3e3e3e;
}
.cap-tags li {
  padding: 4px 9px;
  border-radius: 6px;
  background: #363636;
  border: 1px solid #424242;
  font-size: 10.5px;
  font-weight: 600;
  color: #a0a0a0;
}

.cap-rest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.cap-rest li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 20px 0;
  border-top: 1px solid var(--ev-stroke);
}
.cap-rest-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #353535;
  border: 1px solid #404040;
  color: #9d9d9d;
}
.cap-rest h3 { margin: 0 0 5px; font-size: 14.5px; letter-spacing: -.01em; font-weight: 650; }
.cap-rest p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ev-text-2); }

@media (max-width: 980px) {
  .cap-lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-rest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
}
@media (max-width: 620px) {
  .cap-lead { grid-template-columns: minmax(0, 1fr); }
  .cap-rest { grid-template-columns: minmax(0, 1fr); }
  .cap-card { padding: 20px 18px; }
  .cap-card h3 { font-size: 17px; }
  .cap-rest li { padding: 16px 0; }
}

/* ==================================================================
   3. Модель: сначала своя - Elva Voice AI, она уже выбрана и входит
   в подписку. Каталог сторонних моделей идёт вторым блоком как
   возможность, а не как основное предложение.
   ================================================================== */
.models-section { display: block; }
.models-layout {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  align-items: stretch;
  gap: 10px;
}

.model-hero {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 24px;
  border-radius: 18px;
  background:
    radial-gradient(130% 110% at 0% 0%, rgba(10, 132, 255, .18), transparent 62%),
    linear-gradient(180deg, #31343b, #2a2b2f);
  border: 1px solid #46505d;
}
.model-hero-top { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.model-hero-mark img { width: 46px; height: 46px; border-radius: 12px; }
.model-hero-id { display: grid; gap: 3px; min-width: 0; }
.model-hero-id strong { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.model-hero-id small { font-size: 11.5px; color: var(--ev-text-2); }
.model-hero-badge {
  margin-left: auto;
  flex: none;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #d4d4d4;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}
.model-hero-copy { margin: 18px 0 0; font-size: 14px; line-height: 1.65; color: #c3c3c3; }
.model-hero-stats { display: grid; gap: 10px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid #474d56; }

/* Пример прямо в карточке: он занимает место, которое раньше пустовало,
   и показывает ровно то, о чём текст рядом, - числа, кавычки и имена
   модель ставит сама. */
.model-hero-demo {
  display: grid;
  margin: 20px 0 0;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  overflow: hidden;
}
.mh-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 11px 14px;
}
.mh-line + .mh-line { border-top: 1px solid rgba(255, 255, 255, .08); }
.mh-line span {
  font-size: 10.5px;
  font-weight: 600;
  color: #a3aab3;
}
.mh-line p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #abb0b8; }
.mh-line.got p { color: #e2e5e9; }
.model-stat {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #a6a6a6;
}
.model-bar { height: 6px; border-radius: 99px; background: #3e434b; overflow: hidden; }
.model-bar b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0a84ff, #5cb1ff); }
.model-stat > b { text-align: right; color: #e6e6e6; font-weight: 650; font-variant-numeric: tabular-nums; }
.model-hero-facts { display: grid; gap: 10px; margin: 20px 0 0; padding-top: 0; padding: 0; list-style: none; }
.model-hero-facts li { position: relative; padding-left: 22px; font-size: 12.5px; line-height: 1.5; color: #cdcdcd; }
.model-hero-facts li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: #4ba1ff; font-weight: 700; }

.models-alt { display: flex; flex-direction: column; padding: 22px 22px 18px; border-radius: 18px; background: #2b2b2b; border: 1px solid #3e3e3e; }
.models-alt-head h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; font-weight: 650; }
.models-alt-head p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ev-text-2); }
.models-alt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 18px 0 12px;
}
.models-alt .ml-legend { margin: 0; padding: 0; border-top: 0; }
.models-alt-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--ev-stroke); font-size: 11px; color: var(--ev-text-3); }

/* Строка каталога повторяет ModelListRow: логотип 30, название,
   две пятиточечные шкалы, значок сервиса и кружок выбора. Высота
   одинаковая у локальных и облачных - список не «прыгает». */
.ml-group {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--ev-fill-3);
  border: 1px solid var(--ev-stroke);
  border-radius: var(--ev-r-chip);
}
.ml-group button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ev-text-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.ml-group button:hover { color: var(--ev-text); }
.ml-group button.on { background: rgba(10, 132, 255, .16); color: #4ba1ff; }
.ml-group button:disabled { color: var(--ev-text-3); opacity: .5; cursor: not-allowed; }
.ml-group button:disabled:hover { color: var(--ev-text-3); }

.ml-list { display: grid; flex: none; align-content: start; gap: 10px; }
.ml-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--ev-fill-3);
  border: 1px solid var(--ev-stroke);
}
.ml-row.on { background: rgba(10, 132, 255, .07); border-color: rgba(10, 132, 255, .28); }
.ml-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--ev-r-chip);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.03em;
}
.ml-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--ev-text);
}
.ml-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; }
.ml-tag {
  flex: none;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(10, 132, 255, .18);
  color: #62aaff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .07em;
}
.ml-meters { display: grid; gap: 3px; }
.ml-gear, .ml-pick { display: grid; place-items: center; width: 24px; height: 24px; color: var(--ev-text-3); }
.ml-pick.on { color: var(--ev-accent); }
.ml-pick.locked { color: var(--ev-text-3); }
.ml-legend { display: flex; gap: 16px; font-size: 10.5px; color: var(--ev-text-3); }
.ml-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ml-dot { width: 6px; height: 6px; border-radius: 50%; }
.ml-dot.teal { background: var(--ev-teal); }
.ml-dot.green { background: var(--ev-green); }

@media (max-width: 1000px) {
  .models-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .ml-row { grid-template-columns: 26px minmax(0, 1fr) auto auto; height: 42px; gap: 8px; }
  .ml-logo { width: 26px; height: 26px; font-size: 10px; }
  .ml-name { font-size: 12px; }
  .ml-gear { display: none; }
}
@media (max-width: 360px) {
  /* Шкалы скорости и точности уступают место названию модели -
     иначе длинные названия обрезаются многоточием. */
  .ml-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .ml-meters { display: none; }
  .model-hero, .models-alt { padding: 20px 18px; }
  .model-hero-badge { margin-left: 0; }
  .model-stat { grid-template-columns: 70px minmax(0, 1fr) 38px; gap: 10px; }
}

/* ==================================================================
   4. Личный кабинет: карточки повторяют ProfileView и
   LexoraSyncSettingsCard, включая отдельную «Опасную зону».
   ================================================================== */
.connected-preview { display: grid; gap: 12px; background: none; border: 0; padding: 0; box-shadow: none; }
.acct-card {
  padding: 16px;
  border-radius: var(--ev-r-card);
  background: var(--ev-fill-1);
  border: 1px solid var(--ev-stroke);
}
.acct-card h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ev-text-2);
}

/* --- карточка профиля --- */
.acct-profile { display: flex; align-items: center; gap: 16px; }
.acct-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  background: #4b7599;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
}
.acct-id { display: grid; gap: 5px; min-width: 0; }
.acct-id strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.acct-storage { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: #0a84ff; }
.acct-plan {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
  padding: 8px;
  border-radius: var(--ev-r-card);
  background: var(--ev-fill-1);
  border: 1px solid var(--ev-stroke);
}
.acct-plan-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--ev-r-chip);
  background: rgba(10, 132, 255, .14);
  color: var(--ev-accent);
}
.acct-plan-text { display: grid; gap: 2px; }
.acct-plan-text small { font-size: 10px; font-weight: 600; color: var(--ev-text-2); }
.acct-plan-text strong { font-size: 14px; font-weight: 600; }

/* --- метрики: иконка слева, как в ProfileMetricCard --- */
.acct-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.acct-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--ev-r-card);
  background: var(--ev-fill-1);
  border: 1px solid var(--ev-stroke);
}
.acct-metric-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; }
.acct-metric-mark.indigo { background: rgba(94, 92, 230, .14); color: var(--ev-indigo); }
.acct-metric-mark.blue { background: rgba(10, 132, 255, .14); color: var(--ev-accent); }
.acct-metric-mark.orange { background: rgba(255, 159, 10, .14); color: var(--ev-orange); }
.acct-metric-mark.teal { background: rgba(64, 200, 224, .14); color: var(--ev-teal); }
.acct-metric-text { display: grid; gap: 2px; min-width: 0; }
.acct-metric-text strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.acct-metric-text small { font-size: 10px; font-weight: 500; color: var(--ev-text-2); white-space: nowrap; }

/* --- синхронизация --- */
.acct-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.acct-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(48, 209, 88, .10);
  border: 1px solid rgba(48, 209, 88, .16);
  color: var(--ev-green);
  font-size: 11px;
  font-weight: 600;
}
.acct-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.acct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--ev-stroke);
}
.acct-sync .acct-row:first-of-type { border-top: 1px solid var(--ev-stroke); }
.acct-row-text { display: grid; gap: 2px; min-width: 0; }
.acct-row-text strong { font-size: 13px; font-weight: 500; }
.acct-row-text small { font-size: 11px; color: var(--ev-text-2); }
.acct-toggle {
  position: relative;
  flex: none;
  margin-left: auto;
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .16);
}
.acct-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  transition: transform .2s ease-out;
}
.acct-toggle.on { background: var(--ev-accent); }
.acct-toggle.on::after { transform: translateX(16px); }

/* --- опасная зона --- */
.acct-danger { border-color: rgba(255, 69, 58, .35); }
.acct-danger-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.acct-danger-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-left: auto;
  padding: 6px 11px;
  border-radius: 6px;
  background: #ff453a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 700px) {
  .acct-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-profile { flex-wrap: wrap; }
  .acct-plan { margin-left: 0; }
  .acct-danger-row { flex-wrap: wrap; }
  .acct-danger-button { margin-left: 0; }
}
@media (max-width: 480px) {
  .acct-avatar { width: 52px; height: 52px; font-size: 21px; }
  .acct-id strong { font-size: 18px; }
}
