/* Profile on a phone: a list of sections, each section on its own screen. Desktop keeps the tabs. */
.profile-list, .profile-back-bar { display: none; }

.profile-list-label { margin: 0 4px 10px; color: var(--muted); font-size: 15px; font-weight: 600; }
.profile-list-group { overflow: hidden; margin-bottom: 28px; border-radius: 26px; background: var(--surface-card); }
.profile-list-row { display: flex; width: 100%; min-height: 62px; align-items: center; gap: 14px; padding: 0 16px 0 18px; border: 0; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.profile-list-row:active { background: var(--surface-card-hover); }
.profile-list-row + .profile-list-row .profile-list-body { border-top: 1px solid #2a2a2a; }
.profile-list-row svg { flex: none; stroke-width: 2; }
.profile-list-icon { color: #d6d6d6; }
.profile-list-body { display: flex; flex: 1; min-width: 0; align-self: stretch; align-items: center; gap: 10px; }
.profile-list-name { flex: 1; font-size: 18px; font-weight: 560; }
.profile-list-value { color: var(--muted); font-size: 15px; font-weight: 520; white-space: nowrap; }
.profile-list-value.is-warning { color: var(--accent); }
.profile-list-chevron { color: #5a5a5a; }

/* the same pill as «К списку» on a vacancy */
.profile-back-bar .back-pill { display: inline-flex; height: 40px; align-items: center; gap: 2px; margin-left: -8px; padding: 0 16px 0 8px; border: 0; border-radius: 999px; background: #1b1b1b; color: #c6c6c6; font-size: 15px; font-weight: 600; transition: background-color .15s ease, color .15s ease; }
.profile-back-bar .back-pill svg { width: 20px; height: 20px; stroke-width: 2.2; }
.profile-back-bar .back-pill:is(:hover, :focus-visible) { background: #242424; color: #fff; }

@media (min-width: 821px) {
  .profile-section { min-width: 0; }
}

@media (max-width: 820px) {
  .profile-tabs { display: none; }

  /* the back bar sits at the very top like on a vacancy, so the page loses its top padding */
  .profile-page { padding-top: 0; }
  /* the first group starts where the filters do on vacancies, so switching tabs keeps the top still */
  .profile-list { display: block; padding-top: calc(12px + env(safe-area-inset-top)); }
  .profile-page:not(.is-section-open) .profile-section { display: none; }
  .profile-page.is-section-open .profile-list { display: none; }
  .profile-page.is-section-open .profile-back-bar { position: sticky; z-index: 6; top: 0; display: flex; padding: calc(12px + env(safe-area-inset-top)) 0 18px; background: linear-gradient(to bottom, var(--bg) 72%, transparent); }

  /* pan-y: a sideways drag swipes back, a vertical one still scrolls */
  .profile-section { touch-action: pan-y; }

  /* while swiping the list lies under the section, shifted left and dimmed, like iOS */
  .profile-page.is-swiping .profile-list { position: fixed; z-index: 0; display: block; pointer-events: none; transform: translateX(calc((var(--swipe, 0) - 1) * 28vw)); filter: brightness(calc(.55 + var(--swipe, 0) * .45)); }
  .profile-page.is-swiping .profile-section { position: relative; z-index: 1; min-height: 100dvh; background: var(--bg); box-shadow: -12px 0 32px rgba(0, 0, 0, .6); transform: translateX(calc(var(--swipe, 0) * 100vw)); }
  .profile-page.is-settling :is(.profile-list, .profile-section) { transition: transform .3s cubic-bezier(.2, .8, .2, 1), filter .3s; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-page.is-settling :is(.profile-list, .profile-section) { transition: none; }
}
