/* ==========================================================================
   myproje · основа
   Мобильная раскладка — основная. Десктоп получается добавлением ширины.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

img { max-width: 100%; display: block; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* Видимая рамка фокуса — обязательна для доступности с клавиатуры.
   По дизайн-системе: 2px цветом текста с отступом 3px — на любом фоне
   видна, на тёмном светлая, на светлом тёмная. */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Был классом антиквы. Шрифт теперь один, класс оставлен, чтобы не
   трогать разметку экранов. */
.display { font-family: var(--font-display); }

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-7);
}

/* ---------- шапка ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4);
  max-width: var(--page-max);
  margin: 0 auto;
}
/* Логотип на экранах специалиста — тот же векторный знак, что в шапке
   открытой части (components/logo.js), цвет букв из color */
.brand { display: block; flex-shrink: 0; color: var(--ink); }
.brand .logo-svg { display: block; width: auto; height: 26px; }
.topbar .brand:hover { text-decoration: none; }

/* ---------- вспомогательное ---------- */
.hidden { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.center { text-align: center; }
.muted  { color: var(--muted); }
.soft   { color: var(--ink-soft); }

.stack > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Подчёркивание — признак ссылки в тексте. Логотипу, кнопкам и
   кнопкам-ссылкам оно не нужно: там роль понятна и без него. */
.brand, .btn, .linkbtn, .tab { text-decoration: none; }
.brand:hover, .btn:hover { text-decoration: none; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* «Для профессионалов» в шапке экрана входа — без капса (дизайн-система) */
.topbar__eyebrow { font-size: var(--t-small); color: var(--muted); }

.avatar {
  position: relative;
  flex-shrink: 0;              /* на 375px в строке тесно — аватар не жмётся */
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tone);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar:hover { background: var(--chip-tone); }

/* Кружок 38px, а зона нажатия — 44px, как для всех кнопок на телефоне */
.avatar::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 172px;
  padding: var(--sp-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-drop);
}
.menu__item {
  display: block;
  text-decoration: none;
  width: 100%;
  min-height: 40px;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  text-align: left;
  cursor: pointer;
}
.menu__item:hover { background: var(--canvas); text-decoration: none; }
.menu__item.is-active { color: var(--accent); }

/* --------- сужённая шапка: анкета и форма проекта --------- */
/* Меню убрано намеренно: в процессе заполнения уходить некуда, но путь
   назад виден вверху — именно там его искали оба тестировщика. */
.topback {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
}
.topback:hover { color: var(--accent); }
.topbar__save { white-space: nowrap; }

