/* ============================================================
   НАЧАЛЬНЫЙ ЭКРАН
   Пользуется теми же токенами, что и рабочая область: цвета,
   скругления и тени берутся из studio-base.css, поэтому светлая
   и тёмная темы получаются сами собой.
   ============================================================ */
.start-body{margin:0;background:var(--m-surface)}

.app.start{height:100vh;height:100dvh;display:flex;flex-direction:column}
.app.start .topbar{height:44px;padding:0 18px}

/* Переключатель языка здесь — ссылки на /uz, /ru, /en (задача 150),
   а не кнопки, как в редакторе: вид тот же, что у .lang button */
.lang a{
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
  min-width:40px;height:22px;padding:0 11px;text-decoration:none;
  color:var(--m-on-variant);font:600 12px/1 "PT Sans",system-ui,sans-serif;
}
.lang a:hover{background:var(--m-hover)}
.lang a.on{background:var(--m-secondary-c);color:var(--m-on-secondary-c)}

.start-scroll{flex:1;min-height:0;overflow-y:auto}
.start-page{max-width:1080px;margin:0 auto;padding:32px 28px 56px}

/* Шапка страницы: знак и название */
.start-head{display:flex;align-items:center;gap:14px;margin-bottom:30px}
.start-mark{
  display:grid;place-items:center;width:48px;height:48px;border-radius:16px;
  background:var(--m-primary-c);color:var(--m-on-primary-c);
}
.start-mark svg{width:26px;height:26px}
.start-name{
  font-family:"PT Sans Narrow","PT Sans",system-ui,sans-serif;
  font-size:23px;font-weight:600;letter-spacing:.06em;line-height:1.1;
}
.start-note{font-size:13px;color:var(--m-on-variant)}

.start-title{
  max-width:19ch;margin:0 0 12px;
  font-size:clamp(30px,4.4vw,50px);font-weight:500;line-height:1.08;
  letter-spacing:-.01em;color:var(--text);
}
.start-lead{
  max-width:56ch;margin:0 0 26px;
  font-size:15.5px;line-height:1.55;color:var(--m-on-variant);
}

/* Кнопки */
/* Два ряда: сверху проекты, снизу объекты */
.start-actions{display:flex;flex-direction:column;flex-wrap:nowrap;gap:10px;margin-bottom:38px}
.start-actions-row{display:flex;flex-wrap:wrap;gap:10px}
.start-btn{
  display:inline-flex;align-items:center;gap:10px;height:52px;padding:0 24px;
  border:1px solid var(--m-outline);border-radius:16px;
  background:transparent;color:var(--m-primary);
  font-size:15px;font-weight:600;text-decoration:none;
  transition:background .12s ease;
}
.start-btn:hover{background:var(--m-hover)}
.start-btn .ico{width:20px;height:20px}
.start-btn.primary{
  border-color:transparent;background:var(--m-primary);color:var(--m-on-primary);
  box-shadow:var(--m-e1);padding-left:22px;
}
.start-btn.primary:hover{box-shadow:var(--m-e2);background:var(--m-primary)}
/* «Открыть проект» — кнопка среди ссылок: шрифт и курсор как у соседей */
button.start-btn{font-family:inherit;cursor:pointer}

/* Сообщение под кнопками (067-d): файл не проект, браузер не передаёт файл */
.start-error{margin:-24px 0 30px;font-size:13.5px;line-height:1.5;color:var(--m-primary)}
.start-error[hidden]{display:none}

/* Три карточки в ряд: параметры, история, профиль */
.start-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;align-items:start}
@media (max-width:1040px){ .start-cols{grid-template-columns:1fr 1fr} }
@media (max-width:820px){ .start-cols{grid-template-columns:1fr} }

.start-cap{
  margin:0 0 14px;
  font-family:"PT Sans Narrow","PT Sans",system-ui,sans-serif;
  font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:var(--m-primary);
}
.start-side{
  padding:22px 24px;border-radius:20px;
  background:var(--m-s-low);border:1px solid var(--m-outline-var);
}

.start-rows{display:flex;flex-direction:column}
.start-row{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:11px 0;border-bottom:1px solid var(--m-outline-var);font-size:14px;
}
.start-row:last-child{border-bottom:0}
.start-row span{color:var(--m-on-variant)}

.start-hint{margin:16px 0 0;font-size:12.5px;line-height:1.5;color:var(--m-on-variant)}

/* ------------------------------------------------------------
   ТЕСТОВЫЙ РЕЖИМ И КАРТОЧКА ГОСТЯ — задача 064
   ------------------------------------------------------------ */

/* Полоса под шапкой: вторичный акцент, тот же, что у счётчика элементов */
.test-banner{
  flex:none;padding:7px 18px;text-align:center;
  background:var(--m-secondary-c);color:var(--m-on-secondary-c);
  font-size:12.5px;font-weight:600;
}
/* Строка про анонимную статистику (066): тише основной надписи полосы */
.test-banner .stats-note{margin-left:14px;font-weight:400;opacity:.85}

/* История: список проектов браузера появится с 067-c; до него пуст */
.history-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.history-list:empty + .start-hint{margin-top:0}
.history-list li{
  display:flex;flex-direction:column;gap:2px;
  padding:11px 0;border-bottom:1px solid var(--m-outline-var);
}
.history-list li:last-child{border-bottom:0}
.history-list b{font-size:14.5px;font-weight:600}
.history-list span{font-size:12.5px;color:var(--m-on-variant)}

/* Проекты вошедшего (065-c): имя — ссылка в редактор, справа «Удалить».
   Свёрнутый список прячет строки сверх трёх — класс .more */
.history-list li.history-row{flex-direction:row;align-items:center;gap:10px}
.history-list li.history-row.more{display:none}
.history-list.expanded li.history-row.more{display:flex}
.history-open{
  display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;
  color:inherit;text-decoration:none;
}
.history-open b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-open:hover b{text-decoration:underline}
.history-delete{
  flex:none;padding:4px 10px;border:1px solid var(--m-outline-var);border-radius:10px;
  background:transparent;color:var(--m-on-variant);
  font:600 12px/1.2 "PT Sans",system-ui,sans-serif;cursor:pointer;
}
.history-delete:hover{background:var(--m-hover);color:var(--m-on-surface)}
.history-delete:disabled{opacity:.45;cursor:default}
.history-more{margin-top:8px;justify-content:center}

.profile-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.profile-avatar{
  display:grid;place-items:center;flex:none;width:56px;height:56px;border-radius:28px;
  background:var(--m-primary-c);color:var(--m-on-primary-c);
}
.profile-avatar svg{width:30px;height:30px}
.profile-name{font-size:17px;font-weight:600;line-height:1.2}
.profile-note{margin-top:2px;font-size:13px;color:var(--m-on-variant)}

/* Кнопки входа. Выключенная («скоро») — атрибутом: нажатие не
   перехватывается, браузер сам не даёт ни клика, ни фокуса. «Выйти» у
   вошедшего — та же кнопка, включённая */
.profile-auth{display:flex;flex-direction:column;gap:8px}
.auth-btn{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  width:100%;min-height:42px;padding:8px 14px;
  border:1px solid var(--m-outline);border-radius:14px;
  background:transparent;color:var(--m-primary);
  font:600 14px/1.25 "PT Sans",system-ui,sans-serif;text-align:left;cursor:pointer;
}
.auth-btn:hover{background:var(--m-hover)}
.auth-btn:disabled{opacity:.45;cursor:default}
.soon{
  flex:none;padding:2px 8px;border-radius:9px;
  background:var(--m-s-cont);color:var(--m-on-variant);
  font-size:11px;font-weight:600;
}
/* «Функция в разработке» после нажатия заглушки (082): 3 с под кнопками */
.stub-note{margin:0;font-size:13px;color:var(--m-on-variant)}

/* Вход через Google (065-a). Кнопку рисует скрипт Google — у неё свои
   правила оформления; здесь только место под неё и строки вокруг */
.google-signin{min-height:42px}
.profile-initial{font-size:24px;font-weight:600}
.auth-consent{margin:2px 0 0;font-size:12.5px;line-height:1.4;color:var(--m-on-variant)}
.auth-consent a{color:var(--m-primary)}
.auth-error{margin:0;font-size:13px;font-weight:600;color:var(--m-on-surface)}

/* Специальность и организация вошедшего (§163): подпись над полем */
.profile-fields{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.profile-field{display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:var(--m-on-variant)}
.profile-field select,.profile-field input{
  width:100%;min-height:38px;padding:6px 12px;box-sizing:border-box;
  border:1px solid var(--m-outline-var);border-radius:12px;
  background:var(--m-s-lowest);color:var(--m-on-surface);
  font:14px/1.25 "PT Sans",system-ui,sans-serif;
}
.profile-field select:focus,.profile-field input:focus{outline:2px solid var(--m-primary);outline-offset:-1px}
.profile-saved{margin:0;font-size:13px;color:var(--m-on-variant)}

/* ------------------------------------------------------------
   ТАРИФЫ — задача 148
   ------------------------------------------------------------ */
/* Раздел под рядом карточек, на всю ширину страницы */
.start-plans{margin-top:34px}
.plans-trial{margin:0 0 16px;font-size:14px;color:var(--m-on-variant)}

/* Три карточки (годовая скрыта, §201 У2; вернуть — repeat(4,1fr));
   кнопки внизу на одной линии, сколько бы строк ни заняло описание.
   До 1040 px — две колонки, на телефоне — столбик, как ряд выше */
.plans-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
@media (max-width:1040px){ .plans-grid{grid-template-columns:1fr 1fr} }
@media (max-width:820px){ .plans-grid{grid-template-columns:1fr} }

.plan-card{
  position:relative;display:flex;flex-direction:column;
  padding:22px 24px;border-radius:20px;
  background:var(--m-s-low);border:1px solid var(--m-outline-var);
}
/* Годовая выделена рамкой основного цвета и бейджем */
.plan-card.featured{border:2px solid var(--m-primary);padding:21px 23px}
.plan-badge{
  position:absolute;top:-11px;right:18px;padding:3px 10px;border-radius:10px;
  background:var(--m-primary);color:var(--m-on-primary);
  font-size:11.5px;font-weight:600;
}
.plan-name{margin:0;font-size:15px;font-weight:600}
.plan-price{margin-top:10px;font-size:24px;font-weight:600;line-height:1.2}
.plan-unit{font-size:14px;font-weight:400;color:var(--m-on-variant)}
.plan-includes{flex:1;margin:12px 0 18px;font-size:13.5px;line-height:1.5;color:var(--m-on-variant)}
.plan-btn{justify-content:center;text-align:center}

.lead-contacts{margin:12px 0 0;font-size:13px;color:var(--m-on-variant)}
.lead-contacts a{color:var(--m-primary);overflow-wrap:anywhere}

/* Поле-ловушка для роботов: вне экрана, человек его не видит */
.lead-trap{position:absolute;left:-10000px;width:1px;height:1px;opacity:0}
.lead-fields{display:flex;flex-direction:column;gap:12px}
.lead-fields[hidden]{display:none}
.lead-dlg .dlg-check{align-items:flex-start;line-height:1.4}
.lead-dlg .dlg-check input{margin-top:2px}
/* Ссылка на политику — под строкой согласия, вровень с её текстом */
.lead-privacy{align-self:flex-start;margin:-8px 0 0 24px;font-size:13px;color:var(--m-primary)}
